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

Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

2143


How are the elements of a gridbaglayout organized in java programming?

981


What is your platform’s default character encoding?

1082


What are the ways in which a thread can enter the waiting state?

942


How many types of methods are there?

1051


What is the use of arrays tostring () in java?

1039


What is api in java?

976


Explain the difference between treeset and treemap in java?

969


Is there any case when finally will not be executed?

950


Which is easier .net or java?

1081


Is arraylist ordered?

1071


What is the this keyword?

1029


What is variable and constant explain with example?

1095


Which sorting algorithm is best in java?

980


What is a numeric string?

1024