public static void notEmpty(String string,String msg){
  if (string == null || string.length() == 0)   throw new IllegalArgumentException(msg);
}

public static void notEmpty ( String string , String msg ) { if ( string == null || string . length ( ) == 0 ) throw new IllegalArgumentException ( msg ) ; }
validates that the string is not empty
