下面程序出错的有__行 1. class Student{ 2. private String name; private int age; 3. public Student(){} 4. public void setName(String name){ this.name=name; } 5. void setAge(int age){ this.age= age; } 6. } 7. public class StudentTest{ 8. public void static main(String[] args){ 9. Student s = new Student(); 10. s.name = "Hellen"; 11. s.setAge(20); 12. } 13. }
(A)4
(B) 2
(C) 3
(D) 5
参考答案
继续答题:下一题