

MCQOPTIONS
Saved Bookmarks
1. |
/* Missing statements ? */ public class NewTreeSet extends java.util.TreeSet { public static void main(String [] args) { java.util.TreeSet t = new java.util.TreeSet(); t.clear(); } public void clear() { TreeMap m = new TreeMap(); m.clear(); } } which two statements, added independently at beginning of the program, allow the code to compile? No statement is required import java.util.*; import.java.util.Tree*; import java.util.TreeSet; import java.util.TreeMap; |
A. | 1 only |
B. | 2 and 5 |
C. | 3 and 4 |
D. | 3 and 5 |
Answer» C. 3 and 4 | |