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
Can a static class have a constructor?
What does the append?
what is recursion in java
explain local datetime api in java8?
Can you sort a list in java?
Justify your answer that you can't define a method inside another method in java, if you can then how?
Explain the difference between protected and default access.
How will you get the platform dependent values like line separator, path separator, etc., ?
Can you access the private method from outside the class?
What are the uses of synchronized keyword?
What happens if a constructor is declared private?
Is intellij better than eclipse?
What is namespace in java?
Explain the difference between map and flatmap stream operation?
What is numeric function?