📄 address.java
字号:
//package ch01;
public class Address
{
private String country;
private String city;
private String street;
private int code;
public Address()
{
System.out.println("Address null");
}
public Address(String country, String city , String street, int code)
{
setCountry(country);
setCity(city);
setStreet(street);
setCode(code);
}
public void setCountry(String country)
{
this.country=country;
}
public void setCity(String city)
{
this.city=city;
}
public void setStreet(String street)
{
this.street=street;
}
public void setCode(int code)
{
this.code=code;
}
public String getCountry(){
return country;
}
public String getCity(){
return city;
}
public String getStreet(){
return street;
}
public int getCode(){
return code;
}
public void print()
{
System.out.println("Country is :"+country);
System.out.println("City is :" +city);
System.out.println("Street is :"+ street);
System.out.println("code is :"+code);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -