Need help in JAVA!!!!!!!!!!!!!
How would you test if a URL is valid?
Like this?
public Character testValid( String url) {
{
URL inputURL = new
URL("myURL");
public boolean testValid( String url) {
try {
URI inputURL = new URL("myURL").toURI();
System.out.println("Valid url");
return true;
} catch (MalformedURLException e) {
System.out.println("Not a valid URL");
} catch (URISyntaxException e) {
System.out.println("Not a valid URL");
}
return false;
}


Need help in JAVA!!!!!!!!!!!!! How would you test if a URL is valid? Like this? ...