Here you can find the source of addAllTo(List
private static void addAllTo(List<String> procArgs, String[] args)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { private static void addAllTo(List<String> procArgs, String[] args) { for (String arg : args) { procArgs.add(arg);//w w w .j a v a2 s . c o m } } }