List of usage examples for java.util WeakHashMap size
int size
To view the source code for java.util WeakHashMap size.
Click Source Link
From source file:Main.java
public static void main(String[] args) { WeakHashMap<String, String> weakHashMap = new WeakHashMap<String, String>(); System.out.println("Putting values into the Map"); weakHashMap.put("1", "first"); weakHashMap.put("2", "two"); weakHashMap.put("3", "from java2s.com"); // checking the size of the Map System.out.println("Map size: " + weakHashMap.size()); }