Hi *.*, I wanna know whether java.util.Enumeration is a class or interface? And is it deprectaed in favor of Collection Framework? Why servlets don't use ArrayList or Arrays in lieu of Enumeration in some cases? And lemme know a little bit about Properties also....
------------------ Muhammad Ashikuzzaman (Fahim) Sun Certified Programmer for the Java� 2 Platform --When you learn something, learn it by heart!
Ashik Uzzaman Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Both are interfaces. I don't think Enumeration is deprecated. Iterator interface duplicates the functionality of Enumeration and added a method to remove elements from the underlying collection. SUN suggests that new implementations should consider using Iterator instead of Enumeration. Properties class provides for key-value pair since it extends Hashtable.
For a long time, the Servlet API was kept compatible with JDK v1.1. So that meant using Enumerations and the like rather than the Collections framework. I bet Sun would like to deprecate the old-style collections (Enumeration, Vector, Hashtable, etc) if they could. But they are too firmly entrenched in a number of often-used APIs. - Peter