Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is difference between Iterator and for loop

Answer Posted / bapi paul

An Iterator is an Object, which goes through a Collection
and you can do something with whatever the Iterator is
pointing at.
One big advantage is, that you don't have to know the size
of your Collection.


A Loop is a construct, that repeats something for a certain
amount of times.
One big advantage is, that you always know, at which
position you are.

Is This Answer Correct ?    62 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is mutual exclusion? : Java thread

1025


What is difference between == and === in js?

1013


Can a class extends itself in java?

1030


How many types of threads are there in java?

1061


What should I import for arraylist in java?

1044


What sorting algorithm does javascript use?

994


What is a flag value?

1029


In java, how we can disallow serialization of variables?

994


Is string an object?

1122


How many ways can we create singleton class?

973


What is an enumeration?

1069


Can we create object of static class?

1027


Can java list be null?

1001


Explain the difference between abstract classes and interfaces in java?

1187


What is the static method?

1082