hashmap
Map<Long, HashMap<Long,Boolean>> midmap = new HashMap<Long, HashMap<Long,Boolean>>(size); for(long i=0; i<size-100000; i++){ if(i%10000==0){ System.out.println(i); } HashMap<Long,Boolean> sizemap = new HashMap<Long,Boolean>(5); sizemap.put(1L, true); sizemap.put(2L,true); sizemap.put(3L, true); sizemap.put(4L, true); sizemap.put(5L, true); midmap.put(i, sizemap); } System.out.println("begin to sleep."); try { Thread.sleep(10000000000L); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } midmap.get(1); System.out.println("done!");