How to create a hashmap for a specific object
问题 EDIT: @Oscar Lopez I have added the code you specified, and now have the following: import java.util.HashMap; import java.util.Map; public class Character{ public String name; private HashMap<String, String> stats; public Character(String charName){ name = charName; stats.put("Strength", "5"); stats.put("Dexterity", "5"); stats.put("Constitution", "5"); stats.put("Intelligence", "5"); stats.put("Strength", "5"); stats.put("Wisdom", "5"); } public String getStat(String name) { return stats.get