【简答题】
预测程序运行结果 class Student{ private String name; public static String classNo; public Student(){} public Student(String name, String classNo){ this.name=name; this.classNO=classNo;} public static void show(){ System.out.println(“name=”+name+”classNo=”+classNo);}} public class StudentDemo{ public static void main(String []args){ Student s1=new Student(“ 张 ”,” 计 1”); Student s2=new Student(“ 李 ”,” 计 2”); s1.show();
参考答案:
参考解析:
举一反三