• Post Reply Bookmark Topic Watch Topic
  • New Topic

is enum specific to Java 5?  RSS feed

 
partho mukherjee
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While looking into the 1st chapter of K&B I found the mention of enum in Java 5.Can anyone tell me if we had anything of this sort in Java 1.4?
And is there any specific advantage of using enum over implementing the Enumeration interface?
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, enums were introduced in version 1.5. See enums for details.

The Enumeration interface is basically an old Iterator. It's a completely different thing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!