GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java

 Print  |  
Question:  Tell me the differences between enumeration and iteration?Which can use where in realtime?



October 10, 2006 06:12:25 #7
 Chandrakant   Member Since: Visitor    Total Comments: N/A 

RE: Tell me the differences between enumeration and it...
 
 

Both have almost same functionality but Iterator has little bit extra added value in it......

Iterator takes the place of Enumeration in the Java collections framework. Iterators differ from enumerations in two ways:

  • Iterators allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics.
  • Method names have been improved.
     

 

Back To Question