Java OCA OCP Practice Question 247

Question

Suppose the type of myArray is an array of XXX, and the type of myArray2 is an array of YYY.

When is the assignment myArray = myArray2; legal?

  • A. Sometimes
  • B. Always
  • C. Never


A.

Note

An array may be converted to another array, if the element types of the arrays are compatible.




PreviousNext

Related