Phase IV
Data in Rows
Fixed-length indexed data, array references, traversal, aliasing, and copying.
Arrays put a fixed number of indexed elements behind one reference. This phase covers creation, default values, traversal, bounds, aliasing, copying, jagged arrays and the short String API distinction. It also separates Java guarantees from JVM implementation models: references are opaque, collectors may move objects, and source code cannot assume raw addresses or one physical layout.
When you finish this phase you can
- Declare, fill and walk an array using both loop styles
- Predict default values and the exceptions caused by null references and invalid indexes
- Trace aliasing, shallow copies and independent primitive-array copies
- Traverse rectangular and jagged arrays using each row's own length
- Explain fixed length and how an array-backed list grows by allocating and copying
- Explain constant-time indexed access with an offset model without claiming Java exposes addresses
- Distinguish language guarantees from JVM choices about object layout, registers, heap regions and GC movement