Avoiding java.util.Enumeration
Avoid using java.util.Enumeration objects unless you want to hide data (in other words, to return an enumeration of the data instead of the data itself). Asking a vector or hash table for an Enumeration object is slow and creates unnecessary garbage. If another thread might modify the vector, synchronize the iteration. The Java® SE uses an Iterator object for similar operations, but Iterator objects are not available in the Java® ME.
Parent topic: Best practice: Writing efficient code