Here you can find the source of concatPath(String... path)
public static String concatPath(String... path)
//package com.java2s; //License from project: Apache License public class Main { public static String concatPath(String... path) { String finalPath = ""; for (String item : path) { if (item.startsWith("/")) { finalPath = finalPath.concat(item); } else { finalPath = finalPath.concat("/").concat(item); }//from ww w . j av a 2 s .com } return finalPath; } }