String sti = " "; //Trim the space //As a result, whether it is blank if(sti.trim().isEmpty()) { System.out.println("blank"); }else { System.out.println("notBlank"); }
Recommended Posts