When you have many values of the same type, like marks of 50 students, separate variables do not scale. An array stores them side by side and lets you reach any one by index in constant time. Use it when the size is known up front, as in "read N numbers". If items must be added or removed freely, an ArrayList is the better choice.