You have a private static variable named 'shapes' at the top of your class that you don't set to a specific value - so it's initialized to null.
In your method loadShapesArray() you do this:
Shape[] shape = shapes; But since 'shapes' is null, you are just making 'shape' null also. Therefore this line:
shape[index] = (Shape) new Circle(Integer.parseInt(myFields[c_xCoordinateField]) produces a NullPointerException. You have to initialize the array itself somewhere, by doing something like this:
Shape[] shape = new Shape[10]; That makes an array that can hold 10 Shape objects. For more information on how arrays work, see
The Java Tutorial: Arrays.