how do you store phone numbers using java collections
Answer Posted / shahnawaz sheikh
Using HashMap.. can be one of the way.
HashMap hs = new HashMap();
hs.put("amit","989213232");
hs.put("john","989211422");
hs.put("Alex","989214578");
| Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
Define an enumeration?
What is threaded programming and when is it used? : Java thread
What is a memory leak in java?
What is a map in java?
What is classpath?
What is the method in java?
Can each java object keep track of all the threads that want to exclusively access it?
What is the purpose of encapsulation?
What is the difference between a window and a frame in java programming?
What are three types of loops in java?
Can a static member function access member variable of an object?
What is thread synchronization in java?
What is a java object and java application?
What is the difference between char and char *?
What are the pillars of java?