黑马程序员技术交流社区

标题: super [打印本页]

作者: daniua    时间: 2016-4-1 21:42
标题: super
class Person{
public Person(){
System.out.println(“this is a Person”);
}
}
public class Teacher extends Person{
private String name=”tom”;
public Teacher(){
System.out.println(“this is a teacher”);
super();
}
public static void main(String[] args){
Teacher teacher = new Teacher();
System.out.println(this.name);
}
}
结果输出是啥呀?为什么是他




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2