运行Test的main代码,关于输出的结果正确的是()classPerso...
运行Test的main代码,关于输出的结果正确的是( )
class Person {
public String name = "Person"
public Person() {
sayName()
}
public void sayName() {
System.out.println(name)
}
}
class Student extends Person {
public String name = "Student"
public void sayName() {
System.out.println(name)
}
}
class Test {
public static void main(String[] args) {
new Student()
}
}