== 比较引用的地址equel 比较引用的内容 (Object 类本身除外) String obj1 = new String("xyz"); String obj2 = new String("xyz"); // If String obj2 = obj1, the output will be true if(obj1 == obj2) System.out.printlln("obj1==obj2 is TRUE"); else System.out.println("obj1==obj2 is FALSE");