What is an array in Java?
An array is an unordered collection of elements that can store data of different types.
Actually, arrays in Java are ordered collections of elements of the same type, and they don't allow for different data types.
Can you explain what kind of collections in Java allow different data types?