基本数据类型与包装类可以比较吗
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说明可以比较的
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说明可以比较的