πŸ“Š JAVA
Q. What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
int x = 3.14;
int y = (int) Math.abs(x);
System.out.print(y);
}
}
  • (A) 0
  • (B) 3
  • (C) 3.0
  • (D) 3.1
πŸ’¬ Discuss
βœ… Correct Answer: (B) 3

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
109
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ravi Shankar
Publisher
πŸ“ˆ
81%
Success Rate