URL u4 = new URL("FTP", "10:100::1234", 9999, "index.html"); is not throwing exception. But when I get toString() of this which is
FTP://[10:100::1234]:9999index.html then
new URL(u4.toString()) throws MalformedURLException.
Where as URI with similar constructor
URI u1 = new URI("http","","10::20:10",8080,"index.html", "abcd", "xyz")
throws " URISyntaxException: Relative path in absolute URI " exception.
FTP://[10:100::1234]:9999index.html then
new URL(u4.toString()) throws MalformedURLException.
Where as URI with similar constructor
URI u1 = new URI("http","","10::20:10",8080,"index.html", "abcd", "xyz")
throws " URISyntaxException: Relative path in absolute URI " exception.