判断string是否有相同字符串

如题所述

String str1 = "sss";
String str2 = "sss";
boolean flag = str1.equals(str2);
flag 为true说明相同,反之为不同
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答