7、0212223242526272829public class ReferenceTest{ public static final Mapmap=new HashMap(); public static void main(String[]args){ for (int i=0;i<1000;i++){ map.put(i,new WeakReference(new ReferenceObject
8、(i))); } int i=0; for (Referencer:map.values()){ if (r.get()==null){ i++; } }