基本类不能判断为null,只有包装类可以

基本数据类型与包装类的对应关系

byte → Byte

short → Short

int → Integer

long → Long

float → Float

double → Double

char → Character

boolean→ Boolean
原文地址:https://www.cnblogs.com/wanlige/p/13253219.html