Java OCA OCP Practice Question 1123

Question

Which of the following are true?

  • A. A reference to an array can be cast to a reference to an Object.
  • B. A reference to an array can be cast to a reference to a Cloneable.
  • C. A reference to an array can be cast to a reference to a String.
  • D. None of the above.


A and B.

Note

A and B hold for all array types. An array may never be cast to a String.




PreviousNext

Related