View RSS Feed

Recent Blogs Posts

  1. Enumerations and Iterators

    by , 11-08-2011 at 07:31 PM (My Java Tips)
    An Enumeration is used for iterating over a given collection, Usually of unknown size. Iterator also has the same purpose but Enumeration does not allow modification of the collection, Which can be achieved using Iterator.

    Iteratorís "remove" method removes from the underlying collection the last element returned by the iterator. This method can be called only once per call to the Iterator's "next" method.

    Following code sample will help you understand ...