What is difference between Iterator and for loop

Answer Posted / tulasi ram damarla

Also, iterator is can be used with set to iterate and to
read an element from set. using for loop it is possible to
iterate,but you cannot read an element, because set does
not have a get() method.

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by local class?

511


What is java instanceof operator?

559


What is the final blank variable?

584


What do you understand by casting in java language?

573


What is sizeof in java?

555






Tell me about your ability to work under pressure

1765


What are the different types of data structures in java?

489


What is diamond operator in java?

495


What is Java Shutdown Hook?

608


How do you sing an Applet ?

2028


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

542


What flag up means?

597


What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?

513


What is meant by polymorphism?

532


What is the difference between compiler and jvm?

551