All About Class IllegalAccessError in Java

IllegalAccessError is thrown from an application if an application attempts to access or modify a field or calla a method for which it does not have access to. In general this error is caught by compiler. In very rare case during the run time, if the class definition is changed incompatibly we may get this error.

The structure of the IllegalAccessError class given as:


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

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

No comments:

Powered by Blogger.