摘要:
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+"]"; 阅读全文
摘要:
链表(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()) 阅读全文