Advertisements
Advertisements
Question
Identify the true statement.
Options
All elements in an array of different datatype.
Some elements in an array of same datatype.
All elements in an array are of same datatype.
he first element in an array is of different datatype from the other elements.
MCQ
Advertisements
Solution
All elements in an array are of same datatype.
Explanation:
- An array in Java stores multiple values of the same data type under a single name.
- All elements of an array must be of the same type.
shaalaa.com
Is there an error in this question or solution?
Chapter 7: Arrays - One Dimension - Exercises [Page 172]
