定义一个Address 类(java)

class Address{
	String national;
	String province;
	String city;
	String street;
	String zipcode;
	public 	Address(String national,String province,String city,String street,String zipcode){
		System.out.println("国家:"+national);
		System.out.println("省份:"+province);
		System.out.println("城市:"+city);
		System.out.println("街道:"+street);
		System.out.println("邮编:"+zipcode);
	}
}
public class 习题11 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Address a=new Address("**","**","**","**","***");
	}

}

你可能感兴趣的:(JAVA)