判断字符串是否为空 1、str == null;(字符输出为空时)package sanyue.wuzu.checking.view.CheckPanel; 2、"".equals(str); 3、str.length <= 0; 4、str.isEmpty(); 是否为空,与是否无值(表格添加行时出现错误) 案例 null==userTable.getValueAt(i, j);//从未赋值 userTable.getValueAt(i, j).equals("");//曾经付过值,但现在没值