题目内容
8.7阅读程序,写出运行结果classStudent{StringstuName="学生";staticintNo=0;publicStudent(){No++;System.out.println(stuName+No);}publicStudent(inta){No=a;System.out.println(stuName+a);}publicvoidshow(){System.out.println(stuName+No);}}classDemo{publicstaticvoidmain(String[]args){Studentst1=newStudent();st1.show();Studentst2=newStudent(2);st2.show();st1.show();}}
查看答案
搜索结果不匹配?点我反馈