what is diff bet iterator and enumeration?

Answer Posted / siva thimmannagari

Iterator supports only hasNext(),
next() and remove() methods.
It is not synchronized.


Enumeration supports ONLY
hasMoreElements(), nextElement().
It is synchronized.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to print an arraylist in java?

509


Can we override the private methods?

536


Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?

621


What is the difference between abstract class and interface1? What is an interface?

568


Explain about static nested classes in java?

615






What is final variable?

510


How do you input a string in java?

514


What is sorting algorithm in java?

535


How can an exception be thrown manually by a programmer?

519


What is the applet security manager, and what does it provide?

558


What is the final keyword in java?

565


What is java ceil?

578


What is the difference between stringbuffer and stringbuilder class?

582


Why map is used in java?

588


What does opcode mean?

549