public static boolean isNotEmpty(CharSequence string){
  return string != null && string.length() > 0;
}

public static boolean isNotEmpty ( CharSequence string ) { return string != null && string . length ( ) > 0 ; }
determines if a string is not empty .
