Java is a strongly statically typed language, so it is no good practise to do something like this.Of course you can use HashMaps all over the place, like:1 2 3 4 Map playerSkills = new HashMap<String, Integer>();...playerSkille.set(fireBall, 3);Or pass only Object.class objects around with a lot of instanceOf , but than what is the point to use Java.