. (1 pt. each) | |
Explain what, if anything, is wrong with the
following code fragment? Circle all that apply.
List mywords = new ArrayList(); //line 1 mywords.add("2"); //line 2 mywords.add('2'); //line 3 |
|
notes and answers |
. | |
Given this method header:
boolean checkSet(Set aSet); How can the method determine if there are any duplicate values in aSet? (Trick question) |
|
. (2 pts.) | |
Given this method header:
void printSet(Set aSet); Is there a way that the method can print out all the elements in the set? Explain briefly. |
___ yes ___ no
|
notes and answers |
. | |
One property that a proper equals method must have is that a.equals(a) be true for any object a (of the proper type). This is called the _____________ property. |
|
notes and answers |
. | |
(free bonus point)
With respect to the CSE373 Message Board.... |
|
notes and answers |