티스토리 뷰
package haksa.domain;
public class Employee extends Person{
private String dept;
public Employee(){
}
public Employee(String name,int age,String dept){
super(name,age);
setDept(dept);
}
private void setDept(String dept){
this.dept=dept;
}
public String getDept(){
return dept;
}
//Method overriding.....................
public void printAll(){
super.printAll();
System.out.println("학번:"+getDept());
}
};
'Programming > Java' 카테고리의 다른 글
Management (0) | 2016.05.04 |
---|---|
JDBC_Test (0) | 2016.05.04 |
WrongPoolException (0) | 2016.05.04 |
ShuttingDownException (0) | 2016.05.04 |
ObjectNotFoundException (0) | 2016.05.04 |
댓글