public static boolean isBlank(String str){
  int strLen;
  if (str != null && (strLen=str.length()) != 0) {
    for (int i=0; i < strLen; i++) {
      if (!Character.isWhitespace(str.charAt(i))) {
        return false;
      }
    }
  }
  return true;
}

public static boolean isBlank ( String str ) { int strLen ; if ( str != null && ( strLen = str . length ( ) ) != 0 ) { for ( int i = 0 ; i < strLen ; i ++ ) { if ( ! Character . isWhitespace ( str . charAt ( i ) ) ) { return false ; } } } return true ; }
checks if a string is whitespace , empty ( " " ) or null . strings . isblank ( null ) = true strings . isblank ( " " ) = true strings . isblank ( " " ) = true strings . isblank ( " bob " ) = false strings . isblank ( " bob " ) = false
