Here you can find the source of makePath(Collection
public static String makePath(Collection<File> files)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.io.File; import java.util.Arrays; import java.util.Collection; public class Main { public static String makePath(File... files) { return makePath(Arrays.asList(files)); }// w ww . ja v a2 s . com public static String makePath(Collection<File> files) { return makePath(files, File.pathSeparator); } public static String makePath(Collection<File> files, String pathSeparator) { StringBuilder result = new StringBuilder(); for (File file : files) { if (result.length() != 0) { result.append(pathSeparator); } result.append(file.getPath()); } return result.toString(); } }