public static boolean isEmpty(CharSequence str){
  if (str == null || str.length() == 0) {
    return true;
  }
 else {
    return false;
  }
}

public static boolean isEmpty ( CharSequence str ) { if ( str == null || str . length ( ) == 0 ) { return true ; } else { return false ; } }
returns true if the string is null or 0 - length .
