Java SE 6 Programmer Certified Professional (1Z0-851)
© examsiri.com
Question : 8 of 10
Marks:
+1,
-0
Given:
What is the result?
4. import java.util.*;
5. public class Quest {
6. public static void main(String[] args) {
7. TreeMap<String, Integer> myMap = new TreeMap<String, Integer>();
8. myMap.put("ak", 50); myMap.put("co", 60);
9. myMap.put("ca", 70); myMap.put("ar", 80);
10. NavigableMap<String, Integer> myMap2 = myMap.headMap("d", true);
11. myMap.put("fl", 90);
12. myMap2.put("hi", 100);
13. System.out.println(myMap.size() + " " + myMap2.size());
14. }
15. }What is the result?
Go to Question: