code: public void setArg(int index,String arg){
          if(args==null){
              args = new String[index];
          }else if(args.length<index){
              String[] newArgs  = new String[index];
              System.arraycopy(args,0,newArgs,0,args.length);
              args = newArgs;
          }
          args[index-1]=arg;
      }
docs: 注意此时的index是从1开始，而非0
  @param index
  @param arg