Here you can find the source of newWeakHashMap()
public static final <k, v> WeakHashMap<k, v> newWeakHashMap()
//package com.java2s; //License from project: Apache License import java.util.WeakHashMap; public class Main { /**//w w w. ja v a 2s .co m * Constructs an empty WeakHashMap. */ public static final <k, v> WeakHashMap<k, v> newWeakHashMap() { return new WeakHashMap<k, v>(); } }