• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Enumeration & Properties

 
Ranch Hand
Posts: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
reply
    Bookmark Topic Watch Topic
  • New Topic