int n = (int) Math.pow(3, 4);
System.out.println(n);What is printed?
- Acheck_circle
81
- B
12
- C
81.0
- D
27
Explanation
Math.pow(3, 4) returns 81.0; casting to int gives 81.
AP Computer Science A· difficulty 3/5
int n = (int) Math.pow(3, 4);
System.out.println(n);What is printed?
81
12
81.0
27
Explanation
Math.pow(3, 4) returns 81.0; casting to int gives 81.
Want 10 more like this — adaptive to your weak spots?