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’s the difference between the methods sleep() and wait()?

968


Explain a situation where finally block will not be executed?

981


Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

993


Explain method overloading?

972


What is the difference between processes and threads?

1005


Can we compare two strings in java?

974


Does constructor be static?

999


What is the java virtual machine?

1036


How is string immutable in java?

1003


Is null a value?

988


Explain Basics of OOP Language in java

1002


Can you declare the main method as final?

977


What is hashset in java?

1072


What is static block?

1076


What is ascii code?

1177