public class Leetcode {
public static void main(String[] agrs) {
Integer n1 = new Integer(17);
Integer n2 = new Integer(17);
String c1 = new String("123");
String c2 = new String("123");
System.out.println(c1.equals(c2));
System.out.println(c1 == c2);
System.out.println(n1.equals(n2));
}
}
代码如上