Contents
Class ClassFormatError in Java
ClassFormatError is thrown from an application when java virtual machine attempts to read a binary format of the class file and determines that the file is malformed or can not be interpreted as a valid class file.
The structure of the ClassFormatError class is given as:
public class java.lang.ClassFormatError extends java.lang.LinkageError{
//constructor
public ClassFormatError();
//constructs an empty ClassFormatError object that is an object with no message specified.
public ClassFormatError(String message);
//constructs an ClassFormatError object with the message specified.
}
The class ClassFormatError also inherits methods from Object and Throwable class:
From Object class | From 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() |