All About Class ClassCircularityError in Java



ClassCircularityError is thrown from a program when a class extends to the same class or an interface extends to same interface. This is very rare scenario but can happen.The major reason to get this error is to have multiple version of the same class present in the package structure(library).When JVM load the class it can detect the circularity and throws the error.
The structure is given below:


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

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

No comments:

Powered by Blogger.