-
What is the output of this program?
public class Output
{
public static void main(String args[])
{
double num0 = 5.0;
double num1 = 2.0;
double num2 = Math.pow( num0, num1 );
System.out.print(num2);
}
}
-
- 5
- 2
- 25
- 25.0
- 52
Correct Option: D
Math.pow(num0, num1) methods returns value of num1 to the power num0, i:e num0 ^ num1, 5.0 ^ 2.0 = 25.0