In Java, you can't change the size of an array once created. So you have to provide its size when you first create it. There are two ways of doing this. One is just to give the size:
The other is to actually provide the initial values for the array:
So that means
is creating an array containing no values. So it has size 0 - it's equivalent to int eArr3 = new int;
Which means that when you try to access eArr3, you're accessing the first element of an array with no elements. So it's out of bounds.
Also remember that creating an array without explicitly initializing values or specifying its size between the brackets to the right of the equals sign will cause a compilation error. This is will happen whether or not you try to access an individual element of the array.
This is an interesting article from Oracle. Thank-you for posting. The OCAJ7 exam will have brackets in both spots (for extra confusion and difficulty), but I think this article is correct that placing brackets by the type is more readable.