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
Does constructor return any value?
Is java a security risk?
What is singleton service?
Why hashmap is used in java?
What are the differences between abstract class and interface?
What is use of valueof () in java?
Why are global variables used?
Explain super keyword in java.
What is string data type?
What is a instance variable in java?
Why is logger singleton?
What is meant by data hiding in java?
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
What is a parent class in java?
What is the method to expand and collapse nodes in a jtree?