📄 person.java
字号:
public class Person
{
private String name;
int age;
String sex;
public Person()
{
System.out.println("构造器Person()被调用");
name = "";
}
public Person(String theName)
{
System.out.println("构造器Person(String theName)被调用");
name = theName;
}
public Person(String theName,int theAge)
{
System.out.println("构造器Person(String theName,int theAge)被调用");
name = theName;
age = theAge;
}
public Person(String theName,int theAge,String theSex)
{
System.out.println("构造器Person(String theName,"
+"int theAge,String theSex)被调用");
name = theName;
age = theAge;
sex = theSex;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -