Ready to test your Knowledge?
Try out our new practice tests completely free!
exam preparation banner icon

Starting Out with Java Study Set 1

Computing

Quiz 6 :

A First Look at Classes

Quiz 6 :

A First Look at Classes

search
arrow
Methods that operate on an object's fields are called __________.
Free
Multiple Choice
Answer:

Answer:

A

Tags
Choose question tag
close menu
arrow
A method that gets a value from a class's field but does not change it is known as a mutator method.
Free
True False
Answer:

Answer:

False

Tags
Choose question tag
close menu
arrow
The term "no-arg constructor" is applied to any constructor that does not accept arguments.
Free
True False
Answer:

Answer:

True

Tags
Choose question tag
close menu
arrow
The java.lang package is automatically imported into all Java programs.
True False
Answer:
Tags
Choose question tag
close menu
arrow
When a local variable in an instance method has the same name as an instance field, the instance field hides the local variable.
True False
Answer:
Tags
Choose question tag
close menu
arrow
When an object is passed as an argument to a method, the object's address is passed into the method's parameter variable.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A class's responsibilities include __________.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
Instance methods do not have the key word static in their headers.
True False
Answer:
Tags
Choose question tag
close menu
arrow
Data hiding (which means that critical data stored inside the object is protected from code outside the object) is accomplished in Java by __________.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
An object can store data.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A group of related classes is called a(n) __________.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
A class is not an object. It is a description of an object.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A constructor is a method that is automatically called when an object is created.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The term "default constructor" is applied to the first constructor written by the author of the class.
True False
Answer:
Tags
Choose question tag
close menu
arrow
When an object is created, the attributes associated with the object are called __________.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
Shadowing is the term used to describe where the field name is hidden by the name of a local or parameter variable.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The public access specifier for a field indicates that the field may not be accessed by statements outside the class.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A method that stores a value in a class's field or in some other way changes the value of a field is known as a mutator method.
True False
Answer:
Tags
Choose question tag
close menu
arrow
An access specifier indicates how a class may be accessed.
True False
Answer:
Tags
Choose question tag
close menu
arrow
Instance methods should be declared static.
True False
Answer:
Tags
Choose question tag
close menu
Showing 1 - 20 of 58