private static String merge(String... vals){
  StringBuilder res=new StringBuilder();
  if (vals != null) {
    boolean first=true;
    for (    String val : vals) {
      if (first)       first=false;
 else       res.append(File.pathSeparatorChar);
      res.append(val);
    }
  }
  return res.toString();
}

private static String merge ( String ... vals ) { StringBuilder res = new StringBuilder ( ) ; if ( vals != null ) { boolean first = true ; for ( String val : vals ) { if ( first ) first = false ; else res . append ( File . pathSeparatorChar ) ; res . append ( val ) ; } } return res . toString ( ) ; }
merge string using path separator .
