Java示例字符串比较equals() Java示例比较两个字符串 Java示例字符串比较==运算符 Java示例字符串比较equals() 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.equals(s2)); System.out.println(s2.equals(s3)); } } Java示例比较两个字符串 Java示例字符串比较==运算符