Pergunta de entrevista da empresa Morgan Stanley

What is the difference between a Running time exception and a normal exception

Respostas da entrevista

Sigiloso

18 de mar. de 2010

Runtime Exceptions are not to be handled within the program. The others which extend Exception class have to be caught using try catch block or declared in the signature of the method using the throws keyword.

Sigiloso

8 de out. de 2010

Runtime exceptions extend Throwable, and are not checked. An example of a runtime exception is NullPointerException, or OutOfMemoryError. An example of a checked exception is something like SQLException