Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java Class vocabulary

Total questions: 12

Worksheet time: 4mins

Name
Class
Date
1.
The combining of data and behavior into a single software package is called _________.
a)
Information Hiding
b)
Instantiation
c)
Declaration
d)
Encapsulation
2.
Messages that change an object’s state are called ____________.
a)
Accessors
b)
Mutators
c)
Constructors
d)
Behavior
3.
In a method, the return type should be __________ when the method returns no value.
a)
Static
b)
Private
c)
Public
d)
Void
4.
The purpose of a(n) _________ is to initialize the instance variables of a newly instantiated object.
a)
Constructor
b)
Class
c)
Formal Parameter
d)
Object
5.
An object has  __________ as defined by the methods of its class.
a)
Scope
b)
Identity
c)
Behavior
d)
State
6.

Can be accessed only by other members of their own class

a)

Public

b)

Private

c)

Closed

d)

Method

7.

Executes the program file

a)

Class

b)

Main Method

c)

Package

d)

Compiler

8.

Can be accessed by other members outside their own class

a)

Private

b)

Public

c)

Source Code

d)

OOP

9.
a)

A

b)

B

c)

C

d)

D

e)

E

10.

in java attributes of an object are also known as ...

a)

instance fields

b)

instance variables

c)

instance methods

d)

instance constructors

11.

What is yertle in the code above?

a)

a class

b)

an instance

c)

an instance field

d)

an object

12.

Which of the following explains why a call to alan prints specific information about the alan object not just its reference location

a)

there is another file that has all of the instance fields & methods

b)

they wrote a toString method into the class

c)

it goes back to line #5 to gather all of the information & prints from there