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

how do you store phone numbers using java collections

Answer Posted / shahnawaz sheikh

Using HashMap.. can be one of the way.

HashMap hs = new HashMap();

hs.put("amit","989213232");
hs.put("john","989211422");
hs.put("Alex","989214578");

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should you use arraylist and when should you use linkedlist?

925


What do u mean by variable?

1046


What ide should I use for java?

1023


What is difference between wait and notify in java?

1132


What is the purpose of finalization in java programming?

1028


How many types of methods are there in java?

1002


How we can declare a static variable?

1106


How to stop a thread in java? Explain about sleep () method in a thread?

1012


What is the same as procedures?

982


What access modifiers can be used for variables?

1144


Tell me a few examples of final classes defined in Java API?

1090


What is a boolean field?

956


How do you read and print a string in java?

955


What does system.gc() and runtime.gc() methods do?

1045


How to create packages in java?

942