Class File Verification:
Class File verification is used by Java Virtual Machine (JVM) before full startup of the JVM occurs in running bytecode of an application. This can be done in four Passes-
Pass-1:- Check byte code attributes, magic number, constant pool must not have any superficial data, and class file must not have extra bytes at end.
Pass-2:- Check every class behaviour and attribute and every class has valid names, classes, descriptor, and packages.
Pass-3:- Check code linking, attribute, and analysis data flow.
Pass-4:- Check where class loading occurs to finalize the class verification process.