how do you store phone numbers using java collections

Answer Posted / sunny

We will have to assume that the names are going to be
unique. We may have a situation, that one number is common
for husband & wife or between friends etc. I mean, there is
a possibility, right? And normally you get the name of the
person and you have to find the phone number (I dont think
its going to be the other way round...in normal cases).
Then we need to have the name as the "Key", rather than
as "Value". Let me know, your thoughts on the same. Thanks.

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does constructor return any value?

577


Is java a security risk?

561


What is singleton service?

506


Why hashmap is used in java?

544


What are the differences between abstract class and interface?

508






What is use of valueof () in java?

555


Why are global variables used?

499


Explain super keyword in java.

580


What is string data type?

549


What is a instance variable in java?

544


Why is logger singleton?

562


What is meant by data hiding in java?

636


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

529


What is a parent class in java?

542


What is the method to expand and collapse nodes in a jtree?

607