Results 1 to 4 of 4
Thread: Enumeration
- 06-09-2009, 07:17 AM #1
- 06-09-2009, 08:37 AM #2
Senior Member
- Join Date
- Mar 2009
- Posts
- 552
- Rep Power
- 5
Enumeration (Interface) or enums
Are we talking about the interface (which has been replaced with Iterator) or enums?
enums are a form of a class, represented by java.lang.Enum. They can hold methods, variables, and also hold enum constants. (A fixed set of variables that also implement any abstract methods declared by the enum) enums should be used whenever you have a fixed set of constants where the values are known at compile time. See Enum Types in The Java Tutorials for more information.
Enumeration (the interface) and Iterator are tools for processing arrays/vectors.If the above doesn't make sense to you, ignore it, but remember it - might be useful!
And if you just randomly taught yourself to program, well... you're just like me!
- 06-18-2009, 10:56 PM #3
Member
- Join Date
- Sep 2008
- Posts
- 16
- Rep Power
- 0
Enumeration is not a class or key word;
it is a interface.By using this interface
we iterate the elements of a collection.
It is just like an Iterator interface.
- 06-19-2009, 12:27 AM #4
Senior Member
- Join Date
- Mar 2009
- Posts
- 552
- Rep Power
- 5
Similar Threads
-
Using the built-in enumeration methods
By Java Tip in forum java.langReplies: 0Last Post: 04-17-2008, 07:35 PM -
Using Enumeration to iterate through Hashtable
By Java Tip in forum Java TipReplies: 0Last Post: 02-15-2008, 08:44 AM -
Using Enumeration to get items out of the session
By Java Tip in forum Java TipReplies: 0Last Post: 01-04-2008, 09:34 AM -
Declaring Enumeration
By Java Tip in forum Java TipReplies: 0Last Post: 11-04-2007, 05:59 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks