String s = "3.14";
double d = Double.parseDouble(s);
System.out.println(d * 2);What is printed?
- Acheck_circle
6.28
- B
Error
- C
6
- D
3.14
Explanation
Double.parseDouble converts the string "3.14" to the double value 3.14; multiplied by 2 the result is 6.28.