日期:2014-05-20 浏览次数:20590 次
class A
{
int x,y;
A(int xx,int yy)
{
x=xx;
y=yy;
System.out.println("A"+x+","+y);
}
}
public class B extends A
{
A b=new A(1,2);
B(int x, int y)
{
super(3,4);
this.x=x*x;
this.y=y*y;
System.out.println("B");
}
A a=new A(7,8);
public static void main(String[] args)
{
int x=10,y=20;
A a=new B(x,y);
}
}