

MCQOPTIONS
Saved Bookmarks
1. |
Which two statements, added independently at beginning of the program, allow the code to compile? 1. No statement is required 2. import java.util.*; 3. import.java.util.Tree*; 4. import java.util.TreeSet; 5. import java.util.TreeMap; /* 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(); } } |
A. | 1 only |
B. | 2 and 5 |
C. | 3 and 4 |
D. | 3 and 5 |
Answer» C. 3 and 4 | |