有关java对象引用的问题
wzwuq 2007-11-29 09:23:26 求教一下代码错误提示地解决方法:
错误提示:
non-static variable this cannot be referenced from a static context at line 14 (14:14)
class lesson42 {
class point{
int x,y;
point(int x,int y){
this.x=x;
this.y=y;
}
}
public static void main(String[] args) {
point p = new point(1,1);
point[] pt1 ;//=new point[]{ new point(1,1),new point(2,2),new point(3,3)};
}
}