public static void main(String[] args) throws IOException{String str = null;if(str == null){System.out.println("null");}else{System.out.println("not null");}}希望采纳 谢谢