Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JAVA BASICS

Total questions: 25

Worksheet time: 14mins

Name
Class
Date
1.

Attributes of an object are also known as

a)

methods

b)

properties

c)

classes

d)

functions

2.

Polymorphism related to :

a)

PPO

b)

Class

c)

OPP

d)

OOP

3.

Which from the following is a feature that allows us to perform a single action in different ways.

a)

Abstraction

b)

Polymorphism

c)

Encapsulation

d)

Inheritance

4.

The process by which objects of one class acquire the properties of objects of another class is known as

a)

Polymorphism

b)

Inheritance

c)

Data Hiding

d)

Association

5.

Hiding complexity can also be termed as

a)

Inheritance

b)

Overloading

c)

Data hiding

d)

Abstraction

6.
Which of the following concepts of OOPS means exposing only necessary information to client?
a)
Encapsulation
b)
Abstraction
c)
Data hiding
d)
Data binding
7.
How many objects can be made from a class? 
a)
None, you make classes from objects
b)
one
c)
As many as you want
d)
All of the above
8.
What is the difference between a class and an object?
a)
A class is a blueprint to make an object
b)
An object is a blueprint to make a class
c)
A blueprint is an object to make a class
d)
Blueprint class is an object make a
9.

Which one is NOT the basic element of OOP?

a)

Class

b)

Abstraction

c)

BlueJ

d)

Polymorphism

10.
An object is an instance of a:
a)
parameter
b)
method
c)
class
d)
application
11.
These have identity, state, and behavior.
a)
class
b)
object
c)
method
d)
void
12.
As a blueprint is a design for a house, a class is a design for a(n):
a)
object
b)
variable
c)
constant
d)
statement
13.
The wrapping up of data and functions into a single unit is called
a)
overloading
b)
class
c)
object
d)
encapsulation 
14.

Name of the Parent class of Mortgage and Current

a)

Account

b)

Current

c)

Mortgage

d)

Bank

15.

Select ALL subclasses

a)

Account

b)

Current

c)

Mortgage

d)

Bank

16.

+ getEndDate

+ setOverdraft


are examples of what in OOP?

a)

Classes

b)

Objects

c)

Attributes / Properties

d)

Methods

17.

+ getAccountNumber

+ addInterest


are examples of what in OOP?

a)

Classes

b)

Objects

c)

Attributes / Properties

d)

Methods

18.

-OpeningDate

-InterestRate


are examples of what in OOP?

a)

Classes

b)

Objects

c)

Attributes / Properties

d)

Methods

19.

Mortgage, Current and Account


are examples of what in OOP?

a)

Classes

b)

Objects

c)

Attributes / Properties

d)

Methods

20.
Which of the following is a mechanism by which object acquires the properties of another object?
a)
Encapsulation
b)
 Abstraction
c)
Inheritance
d)
 Polymorphism
21.

Which of the these is the functionality of ‘Encapsulation’?

a)

Binds together code and data

b)

Using single interface for general class of actions

c)

Reduce Complexity

d)

All of the mentioned

22.
The wrapping up of data and functions into a single unit is called
a)
overloading
b)
class
c)
object
d)
encapsulation 
23.

You can make changes to an object with

a)

methods

b)

attributes

c)

modifiers

d)

parameters

24.

What keyword is used to create an object?

a)

new

b)

create

c)

build

d)

start

e)

main

25.

A method is...

a)

A way of calculating things in Java

b)

A strategy for programming

c)

A predefined set of instructions in a class

d)

A way to sore details in a class