Java tutorial
//package com.java2s; import java.io.File; public class Main { public static String makePath(String path1, String path2) { if (path1.endsWith(File.separator)) return path1 + path2; return path1 + File.separator + path2; } }