Spread the love

Class UnknownHostException in Java

Spread the love

Class UnknownHostException in Java

UnknownHostException is thrown from an application to indicate that the IP address of the host could not be determined like that hostname does not match with any of the known hosts.

In short, it signals that the name of a specified host could not be resolved to an IP address.

A great example is shown on my socket page.

The class structure of UnknownHostException is written below:


public class java.io.UnknownHostException extends java.lang.IOException{
//constructor
public UnknownHostException();
//constructs an empty UnknownHostException object that is an object with no message specified.
public UnknownHostException(String message);
//constructs an UnknownHostException object with the message specified which should be the hostname that cannot be resolved..
}

The class UnknownHostException 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  PipedReader Class in Java
READ  Abstract Interface FileNameMap 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