For once, I got there first
I earlier wrote:Option 1
Let's try option 2. You can declare and fill an array with an array initialiser. Note the option 1 created the array, which had 3 elements but it was empty, so you had to use the for loop to put the 3 elements into it. Note also that after saying [3], you are stuck with 3 elements.
You can put as many elements as you can write or spell correctly into that initialiser. Here you have 4, so you can replace any of them, but you are stuck with 4.
You can replace the reference with a reference to a new array whenever you wish, but remember the new array will be empty and must be filled before you try to use its references. There are at least two ways to do it
That snippet gives you a size 2 array, already filled. Note you can only miss out "new Waypoint[]" if you have the declaration in the same statement (as in first code sample in this post).
Look at the
Java™ Tutorials and find the arrays section. It will probably help you.