ACTUAL Exam Questions and CORRECT
Answers
What is the motivation of using methods in a program? - CORRECT ANSWER - used to
break a problem down into small manageable pieces / reuse code
What are instance fields and instance methods? - CORRECT ANSWER - Each instance of
a class has its own set of fields / The methods that operate on an instance of a class
Can a constant be passed as an argument to a method? - CORRECT ANSWER -A
constant can be passed as an argument to a method
What is the scope of a method parameter? - CORRECT ANSWER - is the method in
which the parameter is declared.
Do you have to have a return statement in a value-returning method? - CORRECT
ANSWER - you have to have a return statement in a value-returning method
What is an access specifier of a method? - CORRECT ANSWER - How can a method be
accessed
What is a mutator method? - CORRECT ANSWER - a set method
What is an accessor method? - CORRECT ANSWER - a get method
What is a no-argument constructor? - CORRECT ANSWER - A constructor that does not
accept arguments