• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Enumeration & Properties

 
Ranch Hand
Posts: 2373
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thnx Alan, i was fond of some sort of brief description like this!

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter, i completely agree with you and was also thinking in this track. Despite the fact, may be a few years later these will change ....at least hope so...

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
Do not set lab on fire. Or this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!