本帖最后由 冯敏 于 2011-11-27 13:16 编辑
public class FatherClass
{
public FatherClass()
{
System.out.println(“FatherClass Create”);
}
}
子类:
package test;
import test.FatherClass;
public class ChildClass extends FatherClass
{
public ChildClass()
{
System.out.println(“ChildClass Create”);
}
public static void main(String[] args)
{
FatherClass fc = new FatherClass();
ChildClass cc = new ChildClass();
}
}
结果是什么啊,请详细解释一下执行过程 |
|