【单选题】阅读下面的代码: class Person{ void say(){ System.out.println("hello"); } } class Example{ public static void main(String[] args){ Person p1 = new Person(); Person p2 = new Person(); p2.say(); p1.say(); p2=n...
【单选题】下列java代码中Sample类中的4个输出语句的输出结果依次是 class Person { String name = "person"; public void shout(){ System.out.println(name); } } class Student extends Person { String name = "student"; String school = "scho...
【单选题】阅读下面的代码: class Person{ void say(){ System.out.println("hello"); } } class Example{ public static void main(String[] args){ Person p1 = new Person(); Person p2 = new Person(); p2.say(); p1.say(); p2=nu...
【简答题】阅读下面的代码:
class Person{
void say(){
System.out.println("hello");
}
}
class Example{
public static void main(String[] args){
Person p1 = new Person();
Person p2 = n...
【简答题】阅读下面的代码:
class Person{
void say(){
System.out.println("hello");
}
}
class Example{
public static void main(String[] args){
Person p1 = new Person();
Person p2 = n...