Multiple choice technology web technology

An array in the Java programming language has the ability to store many different types of values.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Java arrays are strongly typed - they can only store elements of one declared type. A primitive array like int[] can hold only integers, while an Object[] can hold different types but only those within the same inheritance hierarchy. An array cannot store arbitrary different types like an integer, a string, and a boolean together.