多选题 Given:
2. import java.util.*;
3. public class Vinegar {
4. public static void main(String[] args) {
5. Set<Integer> mySet = new HashSet<Integer>();
6. do1 (mySet, "0"); do1 (mySet, "a");
7. do2 (mySet, "0"); do2 (mySet, "a");
8. }
9. public static void do1 (Set s, String st) {
10. s.add (st);
11. s.add(Integer.parseInt (st));
12. }
13. public static void do2(Set<Integer> s, String st)
14. s.add (st);
15. s.add(Integer.parseInt (st));
16. } }
Which are true? (Choose all that apply.)
【正确答案】 D、G
【答案解析】