Integer相加产生的类型转换问题

做项目时犯二没有搞清楚优先级的问题从而暴露出一个Integer相加而产生的类型转换的问题

Integer a;

Integer b;

Integer c;

c=  a+b==null?a:b;

java编译器报 The operator == is undefined for the argument type(s) int, null 的错误,改为:

c=  a+(b==null?a:b);之后错误就没有了,这是不是可以说明Integer+Integer=int呢
原文地址:https://www.cnblogs.com/superJF/p/4164235.html