Double d = 4.5;
double r = d * 2;
System.out.println(r);What is printed?
- Acheck_circle
9.0
- B
4.5
- C
9
- D
8.5
Explanation
d is auto-unboxed to double 4.5; multiplying by 2 yields 9.0.
AP Computer Science A· difficulty 3/5
Double d = 4.5;
double r = d * 2;
System.out.println(r);What is printed?
9.0
4.5
9
8.5
Explanation
d is auto-unboxed to double 4.5; multiplying by 2 yields 9.0.
Want 10 more like this — adaptive to your weak spots?