how do you store phone numbers using java collections

Answer Posted / rajeev

Hash map is only the answer to solve this type of problem....
HashMap hs=new HashMap();
hs.lateral={"Ankit Arora","9897655434"};


like this we can store the number using hash map table.

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can u increase the heap size in the memory?

557


What are facelets templates?

605


What is the difference between a synchronized method and a synchronized block?

611


What is a values collection view ?

685


I want to persist data of objects for later use. What’s the best approach to do so?

508






Is void a data type?

540


What restrictions are placed on method overloading in java programming?

578


What is the this keyword?

559


What is thread pool? How can we create thread pool in java?

627


How do I type unicode?

540


What carriage return means?

532


What is use of static method?

538


What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?

602


What is parameter example?

550


what do you understand by synchronization? : Java thread

551