class Teacher
{
private String title;
private String name ;
private int age ;
Teacher (String title)
{
System.out.println(name);
this(name,age,title);
}
Teacher (String name, int age, String title)
{
System.out.println("OK");
}
}
class Test
{
public static void main (String[] args)
{
Teacher teacher1 = new Teacher("John");
Teacher teacher2 = new Teacher("Mike",25,"TA");
}
}
总是运行不出来,也不知道哪错了,还望大牛指点迷津啊
|
|