InterviewSolution
Saved Bookmarks
| 1. |
Difference between a ClassNotFoundException and NoClassDefFoundError? |
|||||||||||||||
|
Answer» ClassNotFoundException and NoClassDefFoundError both OCCUR when a class is not found during runtime. ClassNotFoundException is an exception that is thrown when we try to load a class while EXECUTION of a Java program. NoClassDefFoundError is an error which is thrown when a class marks it presence during COMPILE time but isn’t available during runtime. Despite their similarity of a missing class during runtime, there are a quite a few differences between ClassNotFoundException and NoClassDefFoundError.
|
||||||||||||||||