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

What is the purpose of assert keyword used in jdk1.4.x?

658


Difference between ‘is-a’ and ‘has-a’ relationship in java?

649


What is a layout manager and what are different types of layout managers available in java awt?

815


Difference between == and .equals() ?

661


Describe the syntax of multiple inheritance? When do we use such an inheritance?

685






What are the super most classes for all the streams?

1420


When should I use stringbuffer?

659


What are the high-level thread states in java programming?

699


Which one of the following suits the description of a string better: derived or primitive?

611


What is the difference between static binding and dynamic binding?

669


Explain different types of wrapper classes in java?

696


What are the special characters?

627


Can the garbage collection be forced by any means?

628


If a class is declared without any access modifiers, where may the class be accessed in java programming?

772


What is command line argument in java?

708