This is question is real easy and prob silly but i was trying out arrays declaration and construction
i did this
public class Point {
static int npoints;
int x;
int y;
Point root;
int[] intoos;
intoos = new int[23];
public static void main(
String[] args) {
System.out.println("npoints=" + Point.npoints);
Point p = new Point();
System.out.println("p.x=" + p.x + ", p.y=" + p.y);
System.out.println("p.root=" + p.root);
int[] ints;
ints = new int[23];
}
the diffrent declartion in main works fine but the one in the class declaration i had to this
int[] intoos= new int[23];before the class complied in the code above i got the following errors why ??
intoos = new int[23];
^
cannot resolve symbol
symbol : class intoos
location: class Point
intoos = new int[23];
^
2 errors
just wondering why it will not let me do this
int[] intoos;
intoos = new int[23];
within the class