wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

exception

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

What is an exception ?

a)

Explanation

b)

Error

c)

Both

2.

Run time exception can be handled by how many keywords?

a)

8

b)

9

c)

5

d)

0

3.

What is a thread?

a)

Executable instructions

b)

String

c)

Array

d)

None

4.

File input atream is used to

a)

Write on a file

b)

Read on a file

c)

Both

d)

Nothing

5.

Writing the data to a file is called?

a)

File Buffer stream

b)

Fileinputstream

c)

FileOutputStream

6.

Input and output streams that are used to read and write a file is known as?

a)

Java.io package

b)

Stringbuffer

c)

Thread

7.

RandomAccessFile , rws is?

a)

Read data

b)

Write data

c)

Read and write data with updates

d)

None

8.

How to create a new file obeject?

a)

Outputstream f =extend FileOutputStream

b)

OutputStream f = new FileOutputStream

c)

New FileOutputStream

d)

None

9.

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

a)

try

b)

finally

c)

thrown

d)

catch

10.

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

11.

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