All About Class NoSuchFieldError in Java



NoSuchFieldError is thrown from an application if an application tries to access or modify a specified field of an object,and that object no longer has the field.In general this error is caught during compilation time but can come in run time if the definition of the class has incompatibly changed.

The structure of the class NoSuchFieldError  is given as:


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

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

No comments:

Powered by Blogger.