//==比较引用,equals比较值
//new string("")会创建两个对象
boolean b = "发".equals("发");
System.out.println("发"=="发");//true
System.out.println(new String("发")==new String("发"));//false
System.out.println(new Integer(1).equals(new Integer(1)));//true
System.out.println(new Integer(1)==new Integer(1));//false
/*Integer a = 1;//在-128和127之间直接从IntegerCache中取,不会创建新对象
Integer c = 1;
System.out.println(a==c);//true
System.out.println(a.equals(c));//true */
/*Integer a = 1000;
Integer c = 1000;
System.out.println(a==c);//false
System.out.println(a.equals(c));//true */
Integer a = new Integer(1000);
Integer c = new Integer(1000);
System.out.println(a==c); //false
System.out.println(a.equals(c)); //ture
Boolean b1 = true;
Boolean b2 = true;
System.out.println(b1==b2);