Toggle Navigation
Games
Blog
Class PIN
Join for Free
Sign in
Toggle Navigation
Games
PIN
Join for Free
Blog
Pricing
Contact us
Help center
Sign in
Study
Accessor & Mutator Methods
0
%
0
0
0
Back
Restart
Given class Counter above, what is the type of getValue() method in the code segment? (accessor or mutator)
accessor
Oops!
Okay!
Given class Counter above, what is the type of count() method in the code segment? (accessor or mutator)
mutator
Oops!
Okay!
How many accessor methods do you see in the code segment above?
2
Oops!
Okay!
Consider the above code segment. What is the return type of the getDay() method?
int
Oops!
Okay!
Given class Counter above, how many instances of the Counter class are created in the code segment?
2
Oops!
Okay!
True or False: The coinName variable can be accessed only by methods of the Coin class.
True
Oops!
Okay!
Name the instance methods that are available in class Counter.
getValue() and count()
Oops!
Okay!
The process of hiding object data and providing methods for data access is called ______________________.
encapsulation
Oops!
Okay!
You should declare all instance variables as ____________________.
private
Oops!
Okay!
What is the return type of getModelName() method?
String
Oops!
Okay!
True or False: setVehicleAttributes is an accessor method.
False
Oops!
Okay!
How many instance variables are created in the code segment above?
3
Oops!
Okay!
Given class Counter above, how many instance variables are created in the code segment?
1
Oops!
Okay!
Given class Counter above, how many instance methods are created in the code segment?
1
Oops!
Okay!
How many parameters does the getDay() method have?
0
Oops!
Okay!
Your experience on this site will be improved by allowing cookies.
Allow cookies