CSE 205 FINAL EXAM COMPREHENSIVE
QUESTIONS WITH MULTIPLE CHOICES
|VERIFIED & REVISED ANSWERS (NEW) 2026
Save
Terms in this set (23)
To override a superclass method in B. must use the same method name and the same
a subclass, the subclass method ____. parameter types
A. Must use a different method
name.
B. Must use the same method name
and the 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.
, public interface Sizable B. Sizable.LARGE_CHANGE
{
int LARGE_CHANGE = 100;
void changeSize();
}
Which of the following indicates
how to use the constant
LARGE_CHANGE in your program?
A. LARGE-CHANGE
B. Sizable.LARGE_CHANGE
C. Sizable(LARGE_CHANGE)
D. you cannot directly use the
LARGE_CHANGE constant in your
program
public class BankAccount C. the type parameter for the compareTo method
implements must be the same as the implementing class
Comparable<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 the
same as the implementing class
B. the type parameter for the
Comparable interface in the
implements clause must be the
generic <T>
C. The type parameter for the
compareTo method must be the
same as the implementing class
D. The type parameter for the
compareTo interface must be the
generic <T>
QUESTIONS WITH MULTIPLE CHOICES
|VERIFIED & REVISED ANSWERS (NEW) 2026
Save
Terms in this set (23)
To override a superclass method in B. must use the same method name and the same
a subclass, the subclass method ____. parameter types
A. Must use a different method
name.
B. Must use the same method name
and the 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.
, public interface Sizable B. Sizable.LARGE_CHANGE
{
int LARGE_CHANGE = 100;
void changeSize();
}
Which of the following indicates
how to use the constant
LARGE_CHANGE in your program?
A. LARGE-CHANGE
B. Sizable.LARGE_CHANGE
C. Sizable(LARGE_CHANGE)
D. you cannot directly use the
LARGE_CHANGE constant in your
program
public class BankAccount C. the type parameter for the compareTo method
implements must be the same as the implementing class
Comparable<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 the
same as the implementing class
B. the type parameter for the
Comparable interface in the
implements clause must be the
generic <T>
C. The type parameter for the
compareTo method must be the
same as the implementing class
D. The type parameter for the
compareTo interface must be the
generic <T>