how do you store phone numbers using java collections

Answer Posted / saikatk

Sorry,sunny i am not agree with your scenario that one
number is common for husband & wife or between friends
etc.It is not real life scenario, phone no. are always
register with single person name ,that might be possible two
or many persons have
name,if we use HashMap , the Key might be different than
name like empid or securityid or some unique parameter.
Thanks

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you start a thread twice in Java?

637


Which number is denoted by leading 0x or 0x in java?

566


Can we overload the main() method?

555


What is nextint java?

551


How do I write a self declaration?

555






What is the main use of java?

576


What string is utf8?

550


Write a function to find out longest palindrome in a given string?

597


What is difference between core java and java ee?

478


2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

1841


What is e in java?

543


What is immutable data?

584


What is a buffer in computer?

516


Can a static class implement an interface?

562


What does it mean to flush a file?

574