![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e343. Implementing a StackLinkedList stack = new LinkedList(); // Push on top of stack stack.addFirst(object); // Pop off top of stack Object o = stack.getFirst(); // If the queue is to be used by multiple threads, // the queue must be wrapped with code to synchronize the methods stack = (LinkedList)Collections.synchronizedList(stack);
e344. Implementing a Least-Recently-Used (LRU) Cache e345. Listing the Elements of a Collection e346. Storing Primitive Types in a Collection e347. Creating a Copy of a Collection e348. Making a Collection Read-Only
© 2002 Addison-Wesley. |