Object obj = null;
if (Objects.isNull(obj)) {
System.out.println("对象为空");
}
String str = null;
if (str == null || str.isEmpty()) {
System.out.println("字符串为空");
}
List<String> list = null;
if (list == null || list.isEmpty()) {
System.out.println("集合为空");
}
String[] array = null;
if (array == null || array.length == 0) {
System.out.println("数组为空");
}