Spread the love

Class MalformedURLException in Java

Spread the love

Class MalformedURLException in Java

MalformedURLException is common exception classes in java when working with a network and 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.
}

The class MalformedURLException also inherits methods from class Object and Throwable.

From Object classFrom Throwable class
clone()fillInStackTrace()
getClass()getMessage()
notify()printStackTrace()
wait()printStackTrace(PrintWriter)
wait(long, int)getLocalizedMessage()
wait(long)printStackTrace(PrintStream)
equals(Object)
toString()
finalize()
hashCode()
notifyAll()




Spread the love
READ  Class InflaterInputStream in Java
READ  Class InflaterInputStream in Java
Animesh Chatterjeehttps://techtravelhub.com/
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

Related Articles

Super Keyword in Java Simplified

Super Keyword Super Keyword in Java Simplified: Java defines a special keyword called...

Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent Posts

Super Keyword in Java Simplified

Super Keyword Super Keyword in Java Simplified: Java defines a special...

Learn Object Repository in UFT in An Efficient and Fast Manner

Object Repository in UFT The post will cover the following...

Learn What Primary Tools For Test Automation

Primary Tools For Test Automation According to the Gartner report...

EDITOR PICKS


Spread the love