String空值判定时间:2023-03-09 14:50:13 不能用 str.equalsIgnoreCase(null)。 写了个判定的方法,供以后直接调用: public static boolean isEmpty(String str) { if (str != null && !"".equals(str)) { return false; } return true; }