Java OCA OCP Practice Question 213

Question

Which of the following can fill in the blanks(XXXX) to make this code compile?

d = new XXXX(1_000_000_.00); 
  • A. double, double
  • B. double, Double
  • C. Double, double
  • D. None of the above


D.

Note

This question is tricky as it appears to be about primitive vs. wrapper classes.

There is an underscore right before the decimal point.

This is illegal as the underscore in a numeric literal can only appear between two digits.




PreviousNext

Related