一个小程序出错了
class L{
int a,b ;
L(int a,int b)
{
this.a=a;
this.b=b;
}
void print()
{
System.out.println(a+" "+b);
}
}
class H extends L
{
int x,y,z;
H(int x,int y,int z)
{
super(x,y);
this.z=z;
}
public void print()
{
System.out.println("x="+x+" "+"y="+y+" "+"z="+z);
}
}
public class Z
{
public static void main(String args[])
{
H real=new H(6,7,8);
real.print();
}
}
结果咋不对啊!!刚学Java,请大家帮忙看看!!!