Address类

class Address{
String country;
String province;
String city;
String street;
int post;
public void tell(){
System.out.println("国家:"+country+",省份:"+province+",城市:"+city+",街道:"+street+",邮编"+post);
}
}
public class Address01{
public static void main(String[] args){
Address add=new Address();
add.country="中国";
add.province="北京市";
add.city="北京市";
add.street="牛富路";
add.post=103010;
add.tell();
}
}

posted @ 2016-03-14 20:56  Xcode1003  阅读(225)  评论(0编辑  收藏  举报