1. 程式人生 > >集合詳解(一):Collection以及簡單資料結構

集合詳解(一):Collection以及簡單資料結構

<span style="font-family:Arial;font-size:18px;">		// for迴圈改寫,效率高
		 for(Iterator it = c.iterator();it.hasNext();){
			 Student s = (Student) it.next();
			 System.out.println(s.getName() + "---" + s.getAge());
		 }</span>