package com.itheima;
class Super
{
//Super(){}
int i=0;
public Super(String s)
{
i=1;
}
}
class Demo1 extends Super
{
public Demo1(String s)
{
i=2;
}
public static void main(String[] args)
{
Demo1 d=new Demo1("yes");
System.out.println(d.i);
}
}
//为什么Supper注释掉就编译失败?
|
|