Hierarchy of Errors in JDK

Hello Java Developers! Today I want to tell you about hierarchy of system error in the JDK. You may have heard and worked with Exception class, but also has a Error class, which is system exceptions. Now let’s try to figure it out. So let me tell you about the popular Error children in the JDK.

  1. VirtualMachineError (InternalError, OutOfMemoryError, StackOverflowError, UnknownError)
  2. LinkageError (BootstrapMethodError, ClassCircularityError, ClassFormatError, ExceptionInInitializerError, IncompatibleClassChangeError, NoClassDefFoundError, UnsatisfiedLinkError, VerifyError)

VirtualMachineError contains following classes.

  • InternalError
  • OutOfMemoryError
  • StackOverflowError
  • UnknownError

LinkageError contains following classes.

  • BootstrapMethodError
  • ClassCircularityError
  • ClassFormatError
  • ExceptionInInitializerError
  • IncompatibleClassChangeError
  • NoClassDefFoundError
  • UnsatisfiedLinkError
  • VerifyError



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store