private static void test1() { String a = "a" + "b" + 1; String b = "ab1"; System.out.println(a == b); }//源代码片段来自云代码http://yuncode.net