摘要: package com.lm.multest;import java.util.HashMap;import java.util.Map;class Employee{ private String name; private double salary; public Employee(String n){ this.name = n; this.salary = 0; } public String toString(){ return "[name="+this.name+",salary="+this.salary+"]"; 阅读全文
posted @ 2013-08-28 16:16 微风夜明 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 链表(linked list):是一个有序集合(ordered collection)。 List staff = new LinkedList(); staff.add("Bob"); staff.add("Amy"); staff.add("Carl"); Iterator itr = staff.iterator(); itr.next(); //先移动再删除 B|AC 删除光标之前的元素B itr.remove(); Iterator itra = staff.iterator(); while(itra.hasNext()) 阅读全文
posted @ 2013-08-28 14:37 微风夜明 阅读(257) 评论(0) 推荐(0) 编辑