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说明可以比较的