标签:style static student system util new void java nbsp
package fanxing; import java.util.ArrayList; import java.util.List; public class Test { public static void main(String[] args) { List<Student>list=new ArrayList<Student>(); list.add(new Student("刘德华", 85)); list.add(new Student("张学友", 100)); list.add(new Student("刘杰", 65)); list.add(new Student("汪峰", 57)); list.add(new Student("周迅", 76)); System.out.println(list.size()); list.remove(2); for(Student p:list){ System.out.println(p); } Student s=list.get(0); s.setScore(95); for(int i=0;i<list.size();i++){ if(list.get(i).getScore()<60){ System.out.println(list.get(i)); } } } }
标签:style static student system util new void java nbsp
原文地址:http://www.cnblogs.com/zyy1130/p/6808179.html