class Person{
String name = "No name";
Person() { }
public Person ( String nm ) { name = nm; }
}
class Employee extends Person {
String empID = "0000";
public Employee ( String id ) {
empID = id; }
}
public class EmployeeTest {
public static void main ( String[] args_){
Employee e = new Employee("4321");
System.out.println(e.empID);
}
}
여기서 인스턴스 변수인 name과 empID는 메소드에서 호출할떄 this.value name으로 적어야 하는거 아니에욥??
http://interadheaven.tk/
커뮤니티 사이트 입니다 자주 놀러와주세요