本帖最后由 李海鹏 于 2013-1-15 20:01 编辑
class Students
{
Students()
{
sop("a");
}
Satudents(String name)
{
sop("b");
}
}
class PrimaryStudents extends Students
{
PrimaryStudents()
{
sop(1);
}
PrimaryStudents(String name)
{
sop(2);
}
}
main()
{
PrimaryStudents ps = new PrimaryStudents();
PrimaryStudents ps = new PrimaryStudents("张三");
}
为什么打印的结果不是a1b2呢?而是a1a2??? |