📅  最后修改于: 2022-03-11 15:00:17.383000             🧑  作者: Mango
String myStr1 = "Hello";String myStr2 = "Hello";String myStr3 = "World";System.out.println(myStr1.equals(myStr2)); // Returns "true" because they are equalSystem.out.println(myStr1.equals(myStr3)); // Returns "false"