int x,y;
Point(){
System.out.println("default");
}
Point(int x,int y){
this.x=x;
this.y=y;
}
static Point origin=new Point(0,0);
public String toString(){
return "("+x+","+y+")";
}
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自动生成方法存根
Point p=null;
try{
p=(Point)Class.forName("Point").newInstance();
}catch(Exception ex){
System.out.println(ex);
}
Point a[]={new Point(0,0),new Point(1,1)};
System.out.println("p: "+p);
System.out.println("a: "+a[0]+" "+a[1]);
}
}
p: (0,0)
a: (0,0) (1,1)