Q. What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
double x = 2.0;
double y = 3.0;
double z = Math.pow( x, y );
System.out.print(z);
}
}

  • (A) 2.0
  • (B) 4.0
  • (C) 8.0
  • (D) 9.0
πŸ’¬ Discuss
βœ… Correct Answer: (C) 8.0

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
90
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vijay Sangwan
Publisher
πŸ“ˆ
81%
Success Rate