Arrays in Java are always fixed size. You can create a new array to replace the old one, but you must fix the size of the array.
Actually that notation of [][2] isn't correct Java syntax. Instead, you must do one of the following:
Remove the 2 and let Java figure out the size the array must be.
float endpoints[][] = { {2.7, 5.4}, {1.1, 2.8}, {1.9, 1.3} }; // Java will create a 3*2 array of floats
float endpoints[][] = new float[][] { {2.7, 5.4}, {1.1, 2.8}, {1.9, 1.3} }; // this does the exact same thing
Declare the size of all the dimensions.
float endpoints[][] = new float[3][2]; // you can put values into endpoints either 1 by 1 or row by row
If you want an "infinite" number of rows, you can either create an array of very large size (generally not a good idea) or use ArrayLists (see:
http://www.javaprogrammingforums.com...t-example.html). Note that ultimately you are going to be limited by the amount of memory your system has (more specifically the maximum JVM heap size).
With Java arrays there is no way to enforce that the columns must be width 2 (at least without a wrapper class), however if you're careful you can enforce this de-facto.