Passed!!
1. To override a superclass method in a the same
subclass, the subclass method . as the
A. Must use a different method name. implementi
B. Must use the same method name and the ng class
same parameter types.
C. Must use a different method name and
the same parameter types.
D. Must use a different method name and
different parameter types.
2. public interface Sizable
{
int LARGE_CHANGE = 100;
void changeSize();
}
Which of the following indicates how to use
the con- stant LARGE_CHANGE in your
program?
A. LARGE-CHANGE
B. Sizable.LARGE_CHANGE
C. Sizable(LARGE_CHANGE)
D. you cannot directly use the LARGE_CHANGE
con- stant in your program
3. public class BankAccount implements
Compara- ble<BankAccount>
{
public int compareTo(T other)
{
What is wrong with this code?
A. the type parameter for the Comparable
interface in the implements clause must be
1/
14
, CSE 205 Final Exam Questions With Correct Answers Already
Passed!!
B. must use the same method name and the same parameter
types
B. Sizable.LARGE_CHANGE
C. the type parameter for the compareTo method must be the same as
the implementing class
2/
14