1 今天看了自学手册的第四章
综合实例
package EnumService; public class Person { private String name; private int age; public void setName(String name){this.name=name;} public String getName(){return name;} public int getAge(){return age;} public void setAge(int age){this.age=age;} }
package EnumService; public class Service{ public static void main(String args[]){ Person p=new Person(); p.setName("张无忌"); p.setAge(20); Person p2=new Person(); p2.setName("吴征云"); p2.setAge(30); Person[] ps={p,p2}; for(int i=0;i<ps.length;i++) System.out.println(ps[i].getName()+" "+ps[i].getAge()); } }
2 没遇到什么问题
3 明天继续看自学手册