Here you can find the source of asString(List
private static String asString(List<String> commandLine)
//package com.java2s; /*/* w ww .j a v a 2s . c o m*/ * ==================================================================== * Copyright (c) 2008 JavaGit Project. All rights reserved. * * This software is licensed using the GNU LGPL v2.1 license. A copy * of the license is included with the distribution of this source * code in the LICENSE.txt file. The text of the license can also * be obtained at: * * http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * * For more information on the JavaGit project, see: * * http://www.javagit.com * ==================================================================== */ import java.util.List; public class Main { private static String asString(List<String> commandLine) { String s = ""; for (String cmd : commandLine) s += (s.equals("") ? "" : " ") + cmd; return s; } }