为什么在new Student();处F5无法跟进

ewwerpm ewwerpm 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
eclipse下编译一下代码
class Person
{
public Person()
{
System.out.println("person 无参数构造函数");
}
public Person(String name,int age)
{
System.out.println("person 2 参数的构造函数");
}
}
class Student extends Person
{
public Student()
{
System.out.println("student 无参数的构造函数");
}
public Student(String name ,int age,String school)
{
System.out.println("student 3 参数的构造函数");
}
public Student(String name ,int age,String school,String grade)
{
super(name,age);
System.out.println("student 4 参数的构造函数,super().");
}
}
class MyHelloApply
{
public static void main(String [] args)
{
System.out.println("st1:");
new Student();
System.out.println("---------------------------");
System.out.println("st2:");
new Student("zhangshan",76,"武大");
System.out.println("---------------------------");
System.out.println("st3:");
new Student("lisi",24,"武大","研究生");
}
}

——1、在 new Student();处无论按F5还是F6都跟不进去啊.为什么呢?
2、在new Student("zhangshan",76,"武大");处设置断点,F5跳到 public Student(String name ,int age,String school)处,再F5跳到 public Person()处,再F5的话就“Source not found.”为什么呢?
...全文

相关推荐

评论 10
收藏 已收藏
分享
返回顶部
ewwerpm
Java SE 62,620 成员 307,251 内容