Java - Arrays
Why does the following code print 3 instead of 4?
int[] arr = {1, 2, 3, 4};
for (int i = 0; i < arr.length - 1; i++) {
System.out.println(arr[i]);
}