标签:ack alt [] log intro copy too void 广州
package zy; public class K { public int id; public String name; public int age; public String city;
public String introduce() { return + id + ": 姓名 " + name + ", 年龄" + age + ", 地址" + city ; } }
package zy;
public class L { public static void main(String[] args) { L p1=new L(); L p2=new L(); L p3=new L(); L p4=new L();
p1.id=100000; p1.name="A1"; p1.age=19; p1.city="上海"; p2.id=200000; p2.name="A2"; p2.age=18; p2.city="北京"; p3.id=300000; p3.name="A3"; p3.age=19; p3.city="深圳"; p4.id=400000; p4.name="A4"; p4.age=19; p4.city="广州"; System.out.println(p1.introduce()); System.out.println(p2.introduce()); System.out.println(p3.introduce()); System.out.println(p4.introduce()); } }
标签:ack alt [] log intro copy too void 广州
原文地址:http://www.cnblogs.com/kongtingting/p/7792800.html