Which is the Best Java Web Framework ?

Java - Things to know before OCJP exam - Exceptions

1. ArithmeticException is the subclass of RuntimeException and is an unchecked exception.

2. * Compiler gives error if we don't handle checked exceptions whereas unchecked exceptions are optional to be handled.

3. Either we should catch the checked exceptions or the method should be declared to throw those exceptions.

4. * Catch blocks for try should handle exceptions from specific to general. Compiler gives error if we have generalize catch before specific.

5. * Finally block is always executed whether an exception occurs or not.

6. * When an exception is thrown, rest statements in the try block are not executed.

7. try and then finally without catch is legal in java.

8. try without catch or finally is not legal.

9. * An overriding method cannot throw an exception wider than the exception being thrown from the overriden method.
Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
comments powered by Disqus




×

Try our new Java Interview Questions Search Tool.

There are more than 1000 questions with practice tests.

It's updated daily and It's Awesome.


×

Try our new Java Practice Test tool.

There are more than 200 questions and expanding quickly. It's updated daily and It's Awesome.