wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java Quiz1

Total questions: 10

Worksheet time: 4mins

Name
Class
Date
1.

What is an exception?

a)

Compile time error

b)

Logical Error

c)

Runtime error

2.

try block is used to

a)

monitor exceptions

b)

throws exception

c)

catches exception

d)

handles exception

3.

catch block is used to

a)

throw an exception

b)

create an exception

c)

handles an exception

d)

stops execution

4.

To implement multiple inheritance in Java we use

a)

Package

b)

Abstract class

c)

Interface

d)

Abstract method

5.

Abstract class can have

a)

Abstract methods

b)

Methods with code implementation

c)

Used to create objects

d)

Used to create subclasses

6.

Keyword used to create package is

(a)  

7.

import is used to

a)

create interface

b)

create package

c)

Access package

d)

To create a class

8.

Hybrid inheritance and multiple inheritance is possible in Java using the concept

a)

Package

b)

Interface

c)

Super

d)

Access specifiers

9.

How many primitive data types are there in Java?

a)

5

b)

6

c)

7

d)

8

10.

Java is

a)

Robust

b)

Multithreaded

c)

Interpreted

d)

Platform dependent