How do I build a HashMap in one class and then use it in another in Java?

Basically all I want to do is create a HashMap object in one class, build it in that class using a loop, and then be able to call it into another class. I'm not sure what I need to do to accomplish this. I tried declaring it in the class itself and then building it in the main() function, but that doesn't allow me to access it outside of the class because it would need to be static....

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts