Class LinkageError in Java

Class LinkageError in Java

LinkageError is thrown from an application when a class has some dependency on another class but that class is not linkable. This is also the superclass of a group of errors that indicates linking problems or resolving dependencies among classes.

The appropriate subclass of LinkageError is thrown when there is a problem resolving a reference to a class. Reasons for this may include difficulty in finding the definition of the class or an incompatibility between the current definition and the expected definition of the class.

Ads code goes here

The structure of the LinkageError class is defined as below:

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

The class LinkageError 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()

Share and Enjoy !

READ  Class BufferedOutputStream in Java

Leave a Comment

Your email address will not be published. Required fields are marked *