标签:eth llb 返回 while text static mob jdk void
public class Test { public static void main(String[] args) { int i =0; List<String> list = new ArrayList(); while(true) { list.add(String.valueOf(i++).intern()); } } }
public class Test1 { public static void main(String[] args) { String str1 = new StringBuilder("111").append("-222").toString(); System.out.println(str1.intern()==str1); String str2= new StringBuilder("jav").append("a").toString();; System.out.println(str2.intern()==str2); } } 结果: true false
public class Test1 { public static void main(final String[] args) { while(true){ Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(OOMOBject.class); enhancer.setUseCache(false); enhancer.setCallback(new MethodInterceptor() { @Override public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable { return methodProxy.invoke(objects,args); } }); enhancer.create(); } } static class OOMOBject{ } }
标签:eth llb 返回 while text static mob jdk void
原文地址:https://www.cnblogs.com/use-D/p/10618771.html