I'm trying to create an array of objects in Java. "Point" is a class with two constructors and makes objects which are subclasses of it.
Point[] name = Point[1];
for(int i=0; i < name.length; i++) {
name[i] = new Point(a, 40, 5, "green");
}
I have a "cannot find symbol" error pointing to the second time is says Point.
Launch.java:10: error: cannot find symbol
Point[] name = Point[1];
^
This code however generates no errors.
Point name = new Point(a, 40, 5, "green");
Can anyone help me pinpoint the cause of this error?