✅ Answer:
The Java run-time system generates unchecked exceptions, which are part of the RuntimeException class and its subclasses.
In Java, exceptions are divided mainly into two categories:
Checked Exceptions — Checked at compile time
→ Example: IOException, SQLException
Unchecked Exceptions — Occur at runtime (not checked by compiler)
→ Example: ArithmeticException, NullPointerException
These are exceptions automatically thrown by the Java Virtual Machine (JVM) when an error occurs during program execution.
They belong to the RuntimeException class.
| Exception | Description |
|---|---|
| ArithmeticException | Division by zero |
| NullPointerException | Accessing a method or variable through a null object |
| ArrayIndexOutOfBoundsException | Accessing invalid array index |
| NumberFormatException | Invalid string to number conversion |
| ClassCastException | Invalid type casting |
The Java run-time system generates exceptions that are subclasses of
RuntimeException, known as unchecked exceptions.
First read the answer fully, then try to explain it in your own words. After that, open a few related questions and compare the concepts. This method helps you remember the topic for a longer time and improves exam preparation.