以下代码运行输出的结果是( )public class Student
发布于 2022-03-03 13:50:43
以下代码运行输出的结果是( )
public class Student{
private String sname="张三"
int sage=0
}
public class Bachelor extends Student{
public String major
public static void main(String[] args){
Student s = new Bachelor()
System.out.println(s.name)
}
}
public class Student{
private String sname="张三"
int sage=0
}
public class Bachelor extends Student{
public String major
public static void main(String[] args){
Student s = new Bachelor()
System.out.println(s.name)
}
}
登录后免费查看答案
关注者
0
被浏览
21