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...

Can we iterate through collection using for loop?

Answer Posted / haneef

Yes, We can

Set set=new HashSet();
set.add("one");
set.add("two");

for(Iterator it=set.iterator();it.hasNext();)
{
System.out.println(it.next());
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a singleton in genetics?

1079


Are arrays classes in java?

1040


What is difference between iterator access and index access?

1068


What is role of void keyword in declaring functions?

1055


How do I compare two strings in word in java?

998


What is off heap memory?

1012


What is unicode used for?

1169


Is java call by value?

1100


What is the char data type?

1007


Explain java coding standards for methods?

1052


What is the difference between length and length () in java?

950


Does apple use java?

958


Why does abstract class have constructor?

1008


What is boolean example?

977


What is meant by inheritance and what are its advantages?

1109