Programming  Java  Exception

Answer each question, once completed click submit.

1. Which of the following does not deal with exceptions?

throws throw finalize finally

Workspace

Discuss

2. URL throws an exception called

IllegalURLException URLException MalformedHostException MalformedURLException

Workspace

Discuss

3. Event handling is done by objects which

Contain code for running an applet Contain code for creating a window Contain code for responding to an event generated by a logical input device Contain code for responding to program generated exceptions

Workspace

Discuss

4. Which class is base class for all exceptions?

String Error Throwable RuntimeException

Workspace

Discuss

5. Java’s exception handling mechanism is meant to handle

only compile time errors only syntax errors only runtime errors both runtime and compile time errors

Workspace

Discuss

6. When the JVM runs out of memory, which exception will be thrown?

MemoryBoundException OutOfMemoryError OutOfRangeException NullReferenceException

Workspace

Discuss

7. In Java programming environment, the throw keyword is used

to generate exception programmatically to throw exception object to catch exception object none of the above

Workspace

Discuss

8. Which exception is thrown by read() method ?

Exception FileNotFoundException ReadException IOException

Workspace

Discuss

9. Attempting to access a character that is outside the bounds of a StringBuffer results in a

ArrayIndexOutOfBoundsException StringOverFlowException StringException StringIndexOutOfBoundsException

Workspace

Discuss

10. Exception and Error are immediate subclasses of a class called

Object Throwable AWT Panel

Workspace

Discuss

11. When does Exceptions in Java arises in code sequence?

Run Time Compilation Time Can Occur Any Time None of the mentioned

Workspace

Discuss

12. Which of these keywords is not a part of exception handling?

try finally thrown catch

Workspace

Discuss

13. Which of these keywords must be used to monitor for exceptions?

try finally throw catch

Workspace

Discuss

14. Which of these keywords must be used to handle the exception thrown by try block in some rational manner?

try finally throw catch

Workspace

Discuss

15. Which of these keywords is used to manually throw an exception?

try finally throw catch

Workspace

Discuss

16. Which of these is a super class of all exceptional type classes?

String RuntimeExceptions Throwable Cachable

Workspace

Discuss

17. Which of these class is related to all the exceptions that can be caught by using catch?

Error Exception RuntimeExecption All of the mentioned

Workspace

Discuss

18. Which of these class is related to all the exceptions that cannot be caught?

Error Exception RuntimeExecption All of the mentioned

Workspace

Discuss

19. Which of these handles the exception when no catch is used?

Default handler finally throw handler Java run time system

Workspace

Discuss

20. Which of these keywords is used to manually throw an exception?

try finally throw catch

Workspace

Discuss
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20