1. 代码
package com.fy;
public class T1 {
public static void main(String[] args) {
//定义变量i
int i = 0;
//定义int的包装类integer j 值为0
Integer j = new Integer(0);
//字符串类型
String s = "a";
//包装类
String d = new String("a");
//比较的是地址
System.out.println(s == d);
//自动拆箱
System.out.println(i == j);
//自动装箱
System.out.println(j.equals(i));
}
}