double r = Math.sqrt(16);
System.out.println(r);What is printed?
- A
4
- Bcheck_circle
4.0
- C
16.0
- D
2.0
Explanation
Math.sqrt returns a double; the square root of 16 is 4.0.
AP Computer Science A· difficulty 2/5
double r = Math.sqrt(16);
System.out.println(r);What is printed?
4
4.0
16.0
2.0
Explanation
Math.sqrt returns a double; the square root of 16 is 4.0.
Want 10 more like this — adaptive to your weak spots?