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 a byte string?

1051


Why does java not allow multiple public classes in a java file ?

4375


Which is faster call by value or call by reference?

864


What is the difference between sleep and wait in java?

901


What is an example of a conditional statement?

981


enlist some features of jdk.

908


If system.exit (0); is written at the end of the try block, will the finally block still execute?

1038


What is a method declaration?

939


Why string is not a wrapper class?

1134


Is a class an object?

941


What are passing parameters?

1008


What is the meaning of find and replace?

973


How to find the index of the largest number in an arraylist java?

961


What do you understand by classes in java?

946


What does || || mean in math?

879