Iterator+in+Java+Collection+ Iterator
Iterator+in+Java+Collection+ Iterator
Collection
Framework
: Iterator
Java Collection Framework:
Iterator
• Iterator is universal Iterator, we can apply iterator on
any collection Object.
• Iterator is the only cursor available for entire collection framework.
• Iterator object can be created by calling iterator() method present in
Collection interface.
// Here "c" is any Collection object
// type Iterator interface and refers to "c"