Java tutorial
//package com.java2s; import java.io.File; public class Main { public static String combinPath(String path, String fileName) { return path + (path.endsWith(File.separator) ? "" : File.separator) + fileName; } }