A

Admin • 802.91K Points
Coach

Q. Which of the following statements is true about arrays in Java?

  • (A) Arrays can change in size after initialization.
  • (B) Arrays can store elements of different types.
  • (C) Arrays can have a negative length.
  • (D) Arrays are objects of type Array.
  • Correct Answer - Option(D)
  • Views: 6
  • Filed under category Java
  • Hashtags:

Explanation by: Admin
In Java, arrays are objects. They are instances of classes that extend the abstract class java.lang.Object. However, arrays in Java are implemented as objects of a specific type called "Array". This means that arrays in Java are indeed objects, but they are not instances of the Array class; rather, they are instances of classes that are automatically generated by the Java Virtual Machine (JVM) when arrays are created.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.