public static boolean urlsOverlap(String url1, String url2) throws MalformedURLException {
    """
	Returns a boolean indicating whether the given URLs overlap.
	<table>
	<caption>Example</caption>
	<tr>
	<th>First URL</th>
	<th>Second URL</th>
	<th>Do they overlap</th>
	<tr>
	<td>"http://hostname/folder/"</td>
	<td>"http://hostname/folder/"</td>
	<td>true</td>
	<tr>
	<td>"http://hostname/folder/"</td>
	<td>"http://hostname/folder/file"</td>
	<td>true</td>
	<tr>
	<td>"http://hostname/folder/file"</td>
	<td>"http://hostname/folder/"</td>
	<td>true</td>
	<tr>
	<td>"http://hostname/folder1/"</td>
	<td>"http://hostname/folder2/"</td>
	<td>false</td>
	</table>
	@param  url1 firt URL
	@param  url2 second URL
	@return a boolean indicating whether the given URLs overlap
    """
        return urlsOverlap(new URL(url1), new URL(url2));
    }
public static boolean urlsOverlap(String url1, String url2) throws MalformedURLException {
        return urlsOverlap(new URL(url1), new URL(url2));
    }
public static boolean urlsOverlap ( String url1 , String url2 ) throws MalformedURLException { return urlsOverlap ( new URL ( url1 ) , new URL ( url2 ) ) ; }
Returns a boolean indicating whether the given URLs overlap.
<table>
<caption>Example</caption>
<tr>
<th>First URL</th>
<th>Second URL</th>
<th>Do they overlap</th>
<tr>
<td>"http://hostname/folder/"</td>
<td>"http://hostname/folder/"</td>
<td>true</td>
<tr>
<td>"http://hostname/folder/"</td>
<td>"http://hostname/folder/file"</td>
<td>true</td>
<tr>
<td>"http://hostname/folder/file"</td>
<td>"http://hostname/folder/"</td>
<td>true</td>
<tr>
<td>"http://hostname/folder1/"</td>
<td>"http://hostname/folder2/"</td>
<td>false</td>
</table>
@param  url1 firt URL
@param  url2 second URL
@return a boolean indicating whether the given URLs overlap
Returns a boolean indicating whether the given URLs overlap . <table > <caption > Example< / caption > <tr > <th > First URL< / th > <th > Second URL< / th > <th > Do they overlap< / th > <tr > <td > http : // hostname / folder / < / td > <td > http : // hostname / folder / < / td > <td > true< / td > <tr > <td > http : // hostname / folder / < / td > <td > http : // hostname / folder / file < / td > <td > true< / td > <tr > <td > http : // hostname / folder / file < / td > <td > http : // hostname / folder / < / td > <td > true< / td > <tr > <td > http : // hostname / folder1 / < / td > <td > http : // hostname / folder2 / < / td > <td > false< / td > < / table >