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

The Java runtime system generates RuntimeException and Error exceptions.

In Java, the exceptions generated by the Java run-time system are primarily categorized into two main types:

  1. Checked Exceptions:
    • These are exceptions that the Java compiler forces you to either catch (using a try-catch block) or declare that your method may throw using the throws clause.
    • Examples include IOException, SQLException, etc.
  2. Unchecked Exceptions (Runtime Exceptions):
    • These are exceptions that occur at runtime and are not checked at compile time. It is not mandatory to handle these exceptions explicitly.
    • Examples include NullPointerException, ArrayIndexOutOfBoundsException, ArithmeticException, etc.

In summary, the correct answer to the question would be that the Java run-time system generates both checked exceptions and unchecked exceptions.