Which of the following statements is incorrect?

a. Integer i = 4.5;
b. Double i = 4.5;
c. Object i = 4.5;
d. Number i = 4.5;

a i is an Integer. You cannot assign 4.5 to i. A is incorrect. B, C, and D are correct. 4.5 is autoboxed to new Double(4.5). A Double object is an instance of Object and Double.

Computer Science & Information Technology

You might also like to view...

Which of the following is the most common audio compression format?

A) WMA B) AU C) WAV D) MP3

Computer Science & Information Technology

What is the purpose of a data library?

What will be an ideal response?

Computer Science & Information Technology