title: Does Java have a path joining method?
body: <h3>Exact Duplicate:</h3>
  <p><a href="https://stackoverflow.com/questions/412380/">combine paths in java</a></p>
  <p>I would like to know if there is such a method in Java. Take this snippet as example :</p>
  <pre><code>// this will output a/b
  System.out.println(path_join(&quot;a&quot;,&quot;b&quot;));
  // a/b 
  System.out.println(path_join(&quot;a&quot;,&quot;/b&quot;);
  </code></pre>