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
What is the purpose of assert keyword used in jdk1.4.x?
Difference between ‘is-a’ and ‘has-a’ relationship in java?
What is a layout manager and what are different types of layout managers available in java awt?
Difference between == and .equals() ?
Describe the syntax of multiple inheritance? When do we use such an inheritance?
What are the super most classes for all the streams?
When should I use stringbuffer?
What are the high-level thread states in java programming?
Which one of the following suits the description of a string better: derived or primitive?
What is the difference between static binding and dynamic binding?
Explain different types of wrapper classes in java?
What are the special characters?
Can the garbage collection be forced by any means?
If a class is declared without any access modifiers, where may the class be accessed in java programming?
What is command line argument in java?