📄 person.java
字号:
public class Person implements Cloneable{
private String name;
private int age;
public Person(String name,int age){
this.name = name;
this.age = age;
}
public void setAge(int age){
this.age = age;
}
public void setName(String name){
this.name = name;
}
public void display(){
System.out.println("Name:" + name + "\tAge:" + age);
}
public Object clone(){
Person p = null;
try{
p = (Person)super.clone();
}catch(CloneNotSupportedException e){
e.printStackTrace();
}
return p;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -