Javaの問題
問題
次のプログラムをコンパイルし、実行するとどうなるか。正しいものを選択してください。
1.
2. public class Person {
3. String name = "no name";
4. public Person(String nm){ name = nm;}
5. }
6.
7. public class Employee extends Person{
8. String empId = "0000";
9. public Employee(String id){
10. empId = id;
11. }
12. }
13.
14. public class EmployeeTest {
15. public static void main(String[] args) {
16. Employee e = new Employee("4321");
17. System.out.println(e.empId);
18. }
19. }
20.
問題番号:1506181101321作成者:-