last updated 4/27/07
import java.util.*;
In this package you will find a number of common data structures already implemented for you.
The framework includes
| Similar properties | Differing properties |
|---|---|
|
|

Figure is scanned from Java Programming Advanced Topics, J. Wigglesworth and P. Lumby, 2000 Course Technology, page 395
In another browser window, go to the following official Sun JavaDoc site http://java.sun.com/j2se/1.5.0/docs/api/
Click on the java.util package and answer the following questions
1. In the above drawing
2. What data structures that we studied in CS 2 seem to be missing from the framework?
3. Does every concrete class implement an interface, directly or indirectly?
4. Consider the Set Interface.
5. Does the Set Interface fully mimic the mathematical set concept? Why or why not?
6. What are the performance expectations of the TreeMap operations?
7. Consider the Hashtable class.
8. How is the HashSet class different from the Hashtable?
9. How is the WeakHashMap different from the HashMap?
10. What is the LinkedList in the LinkedHashMap providing? Is the underlying implementation chaining?
11. How many methods are available in the Stack class? What is the likely underlying data structure to implement the stack (Array or linked list)?
12. How would you implement a queue structure with the LinkedList class? What methods support the abstract queue operations?
13. The class Arrays provides a set of static algorithms operable on arrays. What are the polymorphic groups (groups of methods with the same name)? What code would you use to sort your array and execute the binary search in your final project?
14. The Iterator and ListIterator interfaces provide a mechanism to step through the elements of a collection.
15. What miscellaneous classes, finally, are found in the java.util package?