Java示例字符串比较==运算符 Java示例字符串比较equals() Java示例strOrig.lastIndexOf(Stringname)方法 Java示例字符串比较==运算符 public class StringCompareequl{ public static void main(String []args){ String s1 = "codingdict"; String s2 = "codingdict"; String s3 = new String ("Tutorials Point"); System.out.println(s1 == s2); System.out.println(s2 == s3); } } Java示例字符串比较equals() Java示例strOrig.lastIndexOf(Stringname)方法