Here you can find the source of parseArgs(String[] args)
protected static String[] parseArgs(String[] args)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { private static int repeatCount = 1; protected static String[] parseArgs(String[] args) { ArrayList list = new ArrayList(); for (int i = 0; i < args.length; i++) { try { repeatCount = Integer.parseInt(args[i]); } catch (NumberFormatException e) { list.add(args[i]);/* w w w. j av a2 s . c o m*/ } } return (String[]) list.toArray(new String[list.size()]); } }