📜  在java代码示例中使用==进行字符串比较

📅  最后修改于: 2022-03-11 14:52:46.843000             🧑  作者: Mango

代码示例2
In Java Strings, the == operator is used to check the reference of both the string objects.
Use .equals method instead:
str1.equals(str2)