46.2k views
2 votes
NullPointerException and ArithmeticException are both derived from which class?

a) Error
b) Exception
c) RuntimeException
d) IllegalAccessException
e) CheckedException

User NoXSaeeD
by
5.4k points

1 Answer

3 votes

Answer: c) Run-time Exception

Step-by-step explanation: Runtime Exception is the exception that works in the JVM(Java Virtual Machine) as a super-class. It can also act during the general working of the JVM and are not checked by any resources. The exception that are followed from the Runtime exception is Arithmetic exception and Null pointer exception as the subclass. Therefore ,the correct option is option(c).

User Northernman
by
6.0k points