private static boolean optionExist(String args[], String opt) {
    for (String arg : args) {
      if (arg.equalsIgnoreCase(opt)) {
        return true;
      }
    }
    return false;
  }
private static boolean optionExist ( String args [ ] , String opt ) { for ( String arg : args ) { if ( arg . equalsIgnoreCase ( opt ) ) { return true ; } } return false ; }
Check if the option exist in the given arguments.