摘要:
1.常量与常量的拼接结果在常量池,原理是编译期优化 public void test1() { String s1 = "a" + "b" + "c";//等同于"abc" String s2 = "abc"; //"abc"-定是放在字符串常量池中,将此地址赋给s2 /* *最终.java编译成. 阅读全文
摘要:
public static void main(String[] args) { Field[] fields=BaseSalary.class.getDeclaredFields(); for (int i = 0; i < fields.length; i++) { System.out.pri 阅读全文
摘要:
private static Pattern humpPattern = Pattern.compile("[A-Z]"); /** * 驼峰转下划线 * @param str * @return */ public static String humpToLine(String str) { Ma 阅读全文