📄 employee.java
字号:
//import org.esuntech.ch03.Person;
class Employee extends Person
{
private String cno;
public void setCno(String cno){
this.cno=cno;
}
public String getCno(){
return this.cno;
}
public Employee(){
}
public Employee(String name,int age,boolean gender){
super(name,age,gender);
}
public void print()
{
System.out.println("this is a employee!");
System.out.println("Name: " + getName());
System.out.println("Gender: " + getGender());
System.out.println("Age: " + getAge());
if(getAddress() != null)
getAddress().print();
}
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -