1.Objects.isNull()判断对象是空
1.1 判断Integer类型对象
@Test
public void test5(){
Integer one=2;
Integer two=null;
if (Objects.isNull(one)){
System.out.println("one为空");
}else {
System.out.println("one不为空");
}
if (Objects.isNull(two)){
System.out.println("two为空");
}else {
System.out.println("two不为空");
}
}