All About Class MalformedURLException in Java

MalformedURLException is thrown from an application to indicate that a Malformed url has occurred.There could be three scenarios:

  1. No legal  protocol could be found in the specification String
  2. The string could not be parsed.
  3. The URL was not built correctly.
One of the above causes the MalformedURLException .
The class MalformedURLException  is defined as below:


public class java.io.MalformedURLException extends java.lang.IOException{
//constructor
public MalformedURLException();
//constructs an empty MalformedURLException object that is an object with no message specified.
public MalformedURLException(String message);
//constructs an MalformedURLException object with the message specified.

}
 
All About Class MalformedURLException in Java All About Class MalformedURLException in Java Reviewed by Animesh Chatterjee on September 24, 2018 Rating: 5

No comments:

Powered by Blogger.