检测一个字符串是否在jvm的常量池中(原创)
检测一个字符串是否在jvm的常量池中
public static boolean inPool(String s) { String s2 = s.intern(); if (s2 == s) return true; return false; } 发布时间: 2012-06-26 10:04:13 作者: rapoo
检测一个字符串是否在jvm的常量池中(原创)
检测一个字符串是否在jvm的常量池中
public static boolean inPool(String s) { String s2 = s.intern(); if (s2 == s) return true; return false; }