Here you can find the source of removeIndex(String[] args, int index)
public static String[] removeIndex(String[] args, int index)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static String[] removeIndex(String[] args, int index) { List<String> list = new ArrayList<>(Arrays.asList(args)); list.remove(index);/*from w w w . ja va2 s .com*/ String[] newArgs = new String[list.size()]; return list.toArray(newArgs); } }