I have code I am working on, but I am having issues populating the HashMap of HashMaps. The declaration goes as thus;
HashMap<Games, HashMap<Store, Integer>> myMap = new HashMap<Games, HashMap<Store, Integer>>(); Where Game and Store are separate object classes, with only a class variable title.
How do I create instances of the objects in the HashMaps and also populate the two hashmaps. Because I need to tag an Integer to the game in a particular store. Whereas there are different stores and different games in each store.
Thanks in Advance
Edit
Games Class
package gameStore; public class Games { private String title; public Games(String inTitle){ setTitle(inTitle); } private String getTitle() { return title; } private void setTitle(String title) { this.title = title; } } Stores Class
package gameStore; public class LocalStores { private String nameOfStore; public LocalStores(String inNameOfStore){ setNameOfStore(inNameOfStore); } private void setNameOfStore(String nameOfStore){ this.nameOfStore = nameOfStore; } }