wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JAVA S8 (DR LJK) 16.09.2020

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the advantage of Exception Handling

a)

To avoid abnormal termination of a program

b)

To find out errors

c)

To Debug program

d)

None of these

2.

What is the parent class of All Exceptions in JAVA

a)

Throwable

b)

Exception

c)

Error

d)

Bug

3.

Which of the following key word is optional in Exception handling program

a)

try

b)

catch

c)

finally

d)

throw

4.

try block may or may not contains catch blocks

a)

True

b)

False

5.

What is the purpose of 'throw' keyword

a)

To Raise an exception explicityly

b)

To Raise an exception implicityly

c)

To create user defined exceptions

d)

To create custom exceptions

6.

What is an exception

a)

Error occurred during the execution of a program

b)

Bug occurred during the compile time of a program

c)

Simply an Error

d)

It is related to input values

7.

How to create our own exception

a)

using 'throw' keyword

b)

using 'throws' keyword

c)

using 'finally' keyword

d)

using 'throwable' keyword

8.

Exception classes belongs to following package

a)

import java.io.*

b)

import java.lang.*

c)

import java.util.*

d)

import java.lang.Exception.*

9.

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

a)

try

b)

finally

c)

thrown

d)

catch

10.

java.lang.NullPointerException is a

a)

Error

b)

runtime exception

c)

Compile time exception

d)

None