Interview Questions

Difference between ClassNotFoundException and NoClassDefFoundError in Java?

ClassNotFoundException - This exception occurs when application tries to load a class which is not available in class path during compile time.

NoClassDefFoundError - This error occurs when JVM tries to load a class whose definition is not found during run time. This class existed during compile time but not available during run time.