wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java Quiz 4

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

--------- is a symbol, that operates on operands and produce a result

a)

operands

b)

variables

c)

operators

d)

Ternary

2.

Choose the logical operators

a)

And

b)

Less than

c)

OR

d)

Not Equal

3.

What is the result of 13<=13 ?

a)

True

b)

False

c)

Both true and false

d)

None

4.

The result of AND operator is always true, if both the conditions results are _____

a)

True

b)

False

5.

What is the symbol of ternary operator?

a)

?:

b)

?;

c)

:?

d)

;?

6.

Java is case sensitive language.

a)

True

b)

False

7.

What is an exception?

a)

Compile time error

b)

Logical Error

c)

Runtime error

8.

try block is used to

a)

monitor exceptions

b)

throws exception

c)

catches exception

d)

handles exception

9.

catch block is used to

a)

throw an exception

b)

create an exception

c)

handles an exception

d)

stops execution

10.

To implement multiple inheritance in Java we use

a)

Package

b)

Abstract class

c)

Interface

d)

Abstract method

11.

How many primitive data types are there in Java?

a)

5

b)

6

c)

7

d)

8

12.

In this framework, all real-world entities are represented by Classes.

a)

Functional Programming

b)

Logical Programming

c)

Object-Oriented Programming

d)

Procedural Programming

13.

Which of the following creates an object of Main class?

a)

Main obj = new Main;

b)

Main obj = new Main();

c)

Main obj = new Mian();

d)

Main obj == new Main();

14.

Which of the following is the complete syntax of creating a class?

a)

public class Main { }

b)

public class Main() { }

c)

public class Main

d)

public class Main()

15.

Methods are declared within a class.

a)

True

b)

False