Java Programming - Java Exception Handling Questions and Answers

Java Programming : Java Exception Handling

Java Exception Handling Multiple Choice Questions and Answers with Explanations and Example for various Java Interviews, Copetetive Exams. Exception Handling in Java. An exception is an event in java.
1. The exception class is in ____ package
[A] java.file
[B] java.io
[C] java.lang
[D] java.util
Loading...
2. Which keyword is used to monitor statement for exception?
[A] try
[B] ctach
[C] throw
[D] throws
Loading...
3. If an exception is generated in try block , then it is caught in ____ block
[A] finally
[B] throw
[C] throws
[D] catch
Loading...
4. To explicitly throw an exception , ______ keyword is used.
[A] try
[B] ctach
[C] throw
[D] throwing
Loading...
5. ______ is a superclass of all exception classes.
[A] Exception
[B] Throwable
[C] RuntimeException
[D] IOException
Loading...
6. Exception is subclass of ____ class
[A] Exception
[B] Throwable
[C] RuntimeException
[D] IOException
Loading...
7. If a statement tries to divide by zero which exception is thrown?
[A] ArithemticException
[B] NullPointerException
[C] NumberFormatException
[D] None of these
Loading...
8. When a method can throw an exception then it is specified by _____ keyword
[A] finally
[B] throw
[C] throws
[D] catch
Loading...
9. Which block gets executed compulsory whether exception is caught or not.
[A] finally
[B] throw
[C] throws
[D] catch
Loading...
10. To create our own exception class , we have to _______
[A] Extend exception class
[B] Create our own try and catch block
[C] use finally block
[D] Use throws keyword
Loading...

Are these questions helpful for you?



Comments: (Your feedback is valuable to us)

abhishek mohanty 1 week ago Reply

top level question for me....hard labour make me best for this concept


Hack kcaH 2 months ago Reply

not so bad , but helps to revise the concepts once again for people who are good in concepts . i think you can improve the toughness of the questions .


Prabhanjan Borkar 4 months ago Reply

Very authentic stuff! eduzip team you've done a fantastic job. It is so helpful for a drop in an ocean like me!


Rajesh k 4 months ago Reply

programmes format should be in order rather than compressing in to minimum lines


Fairoz 1 year ago Reply

Very nice and helpful


Abhijit Kute 1 year ago Reply

I have amazing experience with you , I learn much more from envision , thank you envision to supporting me to walk on logical way......


rajeev 1 year ago Reply

u would have kept radio buttons and made it like a quiz with answers shown at end .... nice info though


Smile Wizard 2 years ago Reply

You Guys are great.... you help me test how good iam in Java


Anita Mehra 2 years ago Reply

gud job appreciated