public static boolean isEmpty(String str){
  return (str == null) || (str.equals(""));
}

public static boolean isEmpty ( String str ) { return ( str == null ) || ( str . equals ( "" ) ) ; }
checks if a string is empty ( ie is null or empty ) .
