This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
The hasMoreElements is declared in Enumeration interface. Since it is in an interface, there is no implementation. We make use of this method and nextElement() in our programs. We don't give the implemetation for these 2 methods. Where is the implementation given for us?
The implementation will be provided in a class hidden from the users of the interface.This is the beauty(or bad side, as u see it)of OOP in which u can easily use the features of an object without worring how a call to that object is going to behave. Correct me if I am wrong.
Joined: Nov 22, 2008
FYI, Enumeration interface should only be used to support code prior to jdk ver 1.2. If you are codeing a new application/applet. Spend to time to use and learn the Iteration interface. It is not only easier to use but more efficient as well. One the the benefits of 1.2 are the enhancement to the set (or) list processes. Read your documentation and/or TIJ (Think In Java) for more informaiton. Hope this helps, Monty