提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
获取LinkedHashMap的大小
/* from 时代Java公众号 */ import java.util.LinkedHashMap; public class Main { public static void main(String[] args) { LinkedHashMap lHashMap = new LinkedHashMap(); System.out.println("Size of LinkedHashMap : " + lHashMap.size()); lHashMap.put("1","One"); lHashMap.put("2","Two"); lHashMap.put("3","Three"); System.out.println("Size of LinkedHashMap after addition : " + lHashMap.size()); Object obj = lHashMap.remove(