Core Java Technology Section Index | Page 119
How do I count the frequency of some word/object?
The Map interface can be used to count the number of times a word/object appears. The following program demonstrates counting word frequency from the command line:
import java.util.*;
public cl...more
How do I use a ListIterator to go through a List backwards?
List list = ...;
ListIterator iterator = list.listIterator(list.size());
while (iterator.hasPrevious()) {
Object element = iterator.previous();
// Process element
}
How do I use an Iterator to go through a Collection?
Collection collection = ...;
Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
Object element = iterator.next();
// Do something with element
}
}
more
What do I have to know about the Collections Framework to be a Certified Java Programmer?
According to the exam objectives, you need to: "Make appropriate selection of collection classes/interfaces to suit specified behavior requirements."
more
Where do I get the Collections Framework for use with JDK 1.1?
The subset of the Collections Framework for use with JDK 1.1 is available with the InfoBus information: http://java.sun.com/beans/infobus/index.html#DOWNLOAD_COLLECTIONS.more
Where can I learn how to use the Collections Framework?
The Java Developer Connection has a short course available at http://developer.java.sun.com/developer/onlineTraining/collections/. In addition, the online Java Tutorial book has a trail dedicated ...more
Where can I find an article comparing JGL and the Collections Framework?
JavaWorld posted an article comparing the two frameworks back in their January 1999 issue: The battle of the container frameworks: which should you use?more
What other frameworks are there for general data structures?
The Generic Collection Library for Java - JGL from ObjectSpace has been around since 1996 and the same version works with both JDK 1.1 and the Java 2 SDK.
Doug Lea's Collections Package is a pre...more
Why is the Dictionary class not an interface?
Rumor has it that the Dictionary class is so old that the concept of interfaces didn't exist yet. Once interfaces were introduced, nobody bothered to change Dictionary to an interface.
What is object serialization?
Serializing an object involves encoding its state in a structured way within a byte array. Once
an object is serialized, the byte array can be manipulated in various ways; it can be
written to a f...more