Java ==运算符 Java String.equals() versus == Java字符串文字 Java ==运算符 public class Sample { 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 String.equals() versus == Java字符串文字