HashMap Java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

HashMap Java

how to add multiple values to single key in Java and print all the values with single key?

18th Jan 2021, 9:31 AM
Bentameur Mohammed Ayoub
Bentameur Mohammed Ayoub - avatar
1 Answer
+ 2
Ayoub Bentameur Make an arraylist. Store all values in that array and put the array in HashMap. Here is the best example to learn how to make HashMap with different objects. https://code.sololearn.com/csCtb155654V/?ref=app https://code.sololearn.com/cOOk0iyMrHNd/?ref=app
18th Jan 2021, 11:51 AM
A͢J
A͢J - avatar