Can I create a hash map outside the main, if so how? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can I create a hash map outside the main, if so how?

I have a hash map and I want to create it in a different class and then access it in another class with the main. I've tried before but it has failed

31st May 2019, 7:45 PM
Yawe
Yawe - avatar
2 Answers
+ 4
Yawe hi You can do like this way explained in the link if you get any problem in understanding that ping me Have 🍎 🍎 🍎 🍎 https://stackoverflow.com/questions/29197899/accessing-a-hashmap-from-a-different-class
31st May 2019, 7:52 PM
DishaAhuja
DishaAhuja - avatar
0
DishaAhuja thanks for that, let me try it out. Will let you know!
31st May 2019, 10:05 PM
Yawe
Yawe - avatar