Home / Questions / What class of exceptions are generated by the Java run-time system?
Explanatory Question

What class of exceptions are generated by the Java run-time system?

👁 31 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

The Java run-time system automatically generates exceptions that belong to the RuntimeException and Error classes.
Examples include:

  • ArithmeticException (e.g., division by zero)

  • NullPointerException (accessing null object)

  • ArrayIndexOutOfBoundsException (invalid array index)

  • StackOverflowError, OutOfMemoryError, etc.

These exceptions are usually unchecked and occur during program execution.