基本数据类型与包装类可以比较吗

package example;

public class Test {
    public static void main(String[] args) {
    int i=10;
    Integer q=new Integer(10);
    System.out.println(i==q);
}
}

true

输出是ture说明可以比较的

posted @ 2016-02-23 23:07  zerocoin  阅读(280)  评论(0编辑  收藏  举报