What is an array in Java?
An array is a fixed-size, indexed collection of elements of the same data type. It allows random access to elements using an index.
Exactly! Arrays are a simple and effective way to store and access data when the size is known in advance.
Can you explain the difference between an array and an `ArrayList` in Java?