Arrays
Read · 1 of 4
Positions start at 0
int[] marks = {70, 85, 90}; makes an array of 3 ints. marks[0] is the first, marks[2] the last. marks.length is 3.
new int[n] makes an array of n zeros, ready to fill. An array's size is fixed once it's made.
Using a position that doesn't exist (like marks[3]) crashes the program with ArrayIndexOutOfBoundsException.