String Arrays in Java
String Arrays is about Java arrays. An array is a fixed-size row of the same type. Index from 0. Length is a.length (a field, not a method). Last valid index is length - 1.
Create String Arrays: int[] a = new int[5]; or int[] a = {10, 20, 30};. A 2D array is an array of arrays: int[][] m = {{1,2},{3,4}}; m[1][0] is 3. Jagged means rows can have different lengths.
String Arrays size cannot grow. If you need grow/shrink, use ArrayList. Out of range → ArrayIndexOutOfBoundsException.
Let's take this on the board with one tiny Main class — no extra files. String Arrays in Java — prints length 3, middle value 20, then all values. Start from main, go line by line, and stop at each print. That output is the proof for String Arrays.
index → 0 1 2
array → [10, 20, 30]
↑ ↑
first length-1Contrast array vs ArrayList in one line.