
4K followers • CS & IT
Jul 23, 2025 • 55m • 231 views
an array is an important linear data structure that allows us to store multiple values of the same type. Arrays in Java are treated like objects. For primitive types like int or char, the actual values are stored in contiguous memory locations. But if the array holds objects, then it does not store the objects themselves in order. Instead, it keeps the addresses to where those objects are stored, and the objects can be anywhere in memory.