• Post Reply Bookmark Topic Watch Topic
  • New Topic

Iterator vs. Enumeration for getInitParameterNames  RSS feed

 
Femi Byte
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers, does anyone know why the method returns an Enumeration instead of an Iterator, which is newer and which the Enumeration API docs itself says should be preferred?

femibyte
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When getInitParameterNames() was defined, Iterator was not available. It has remained Enumerator for backwards compatibility.
 
Femi Byte
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh ok, thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!