Java tutorial
//package com.java2s; public class Main { private static String combineInternal(String path1, String path2) { if (path1.endsWith("/") && path2.startsWith("/")) { return path1 + path2.substring(1, path2.length()); } else { return path1 + path2; } } }