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
When should you use arraylist and when should you use linkedlist?
What do u mean by variable?
What ide should I use for java?
What is difference between wait and notify in java?
What is the purpose of finalization in java programming?
How many types of methods are there in java?
How we can declare a static variable?
How to stop a thread in java? Explain about sleep () method in a thread?
What is the same as procedures?
What access modifiers can be used for variables?
Tell me a few examples of final classes defined in Java API?
What is a boolean field?
How do you read and print a string in java?
What does system.gc() and runtime.gc() methods do?
How to create packages in java?