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

Differences between external iteration and internal iteration?

859


What is thread count in java?

730


Give me example of derived data types.

842


What is pass by value?

710


What is the generic class?

710


Can Exception handling we can handle multiple catch blocks?

829


What is an object class?

768


What is unicode with example?

805


What is the same as procedures?

750


How to check if linked list contains loop in java?

652


What is difference between hashset and hashmap?

787


Explain access modifiers in java.

776


What is use of static method?

762


When should I use stringbuffer?

778


Why is stringbuffer faster than string?

694