double p = Math.pow(2, 5);
System.out.println(p);What is printed?
- A
25.0
- B
10.0
- Ccheck_circle
32.0
- D
32
Explanation
Math.pow(2, 5) computes 2^5 = 32 and returns a double, so 32.0 is printed.
AP Computer Science A· difficulty 3/5
double p = Math.pow(2, 5);
System.out.println(p);What is printed?
25.0
10.0
32.0
32
Explanation
Math.pow(2, 5) computes 2^5 = 32 and returns a double, so 32.0 is printed.
Want 10 more like this — adaptive to your weak spots?