Arrays Are Objects in Java | Generated by AI

Home 2025.12

The correct answer is B. Objects.

In Java, arrays are objects, even if they hold primitive types (like int[]). This is explicitly stated in the Java Language Specification (JLS §4.3.1 and §10): “In the Java programming language, arrays are objects, are dynamically created, and may be assigned to variables of type Object. All methods of class Object may be invoked on an array.”

Key evidence:

Why not the other options?

Your selection of A is a common misconception, but the official spec and behavior confirm arrays are objects.


Back

x-ai/grok-4.1-fast

Donate