Here you can find the source of buildPath(String... strings)
Parameter | Description |
---|---|
strings | a parameter |
public static String buildPath(String... strings)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w w w . j a v a2 s . co m*/ * Builds a file path by concatenating the single strings and separating * them with the system specific file separator character. * * @param strings * @return */ public static String buildPath(String... strings) { StringBuilder sb = new StringBuilder(); for (String s : strings) { if (sb.length() != 0) sb.append(System.getProperty("file.separator")); sb.append(s); } return sb.toString(); } }