title: How to get URL using relative path?
body: <p>I have a URL:</p>
  <pre><code>URL url=new URL(&quot;https://example.com/aa/bb/cc/file.html&quot;);
  </code></pre>
  <p>and a relative path:</p>
  <pre><code>String relativePath=&quot;../file2.html&quot;; //maybe is &quot;/file3.html&quot;
  </code></pre>
  <p>I want to get <code>http://example.com/aa/bb/file2.html</code> using variable <code>url</code> and <code>relativePath</code></p>
  <p>How to do it?</p>