code: public static String joinPaths(String... paths) {
  
          String result = listAsString(Arrays.asList(paths), "/");
          // result may now contain multiple consecutive slashes, so reduce them to single slashes
          result = result.replaceAll("/+", "/");
          return result;
      }
docs: Concatenates multiple paths and separates them with '/'.<p>
  
  Consecutive slashes will be reduced to a single slash in the resulting string.
  For example, joinPaths("/foo/", "/bar", "baz") will return "/foo/bar/baz".
  
  @param paths the array of paths
  
  @return the joined path