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:
Map playerSkills = new HashMap<String, Integer>();
When you code in Java you always have to think about types. So you have an item which can be applied to what?
Only the player or also humans, monsters, a table??
When you have this figured out, you normally build up an inheritance tree.
Thing: has a position
Table is a Thing
LivingThing is a Thing, but also has healt
Monster is a LivingThing, has loot
Zombie is a Monster
Human is a LivingThing, has a name
Player is a Human, has items
And in the and you do something like this
class HealthPotion extends Item
void applyTo(LivingThing someon);
If you're going for a casual game, that's a good idea. For most casual games that would work fine.
However, you can't have concrete classes like HealthPotion if you are developing a flexible game engine as it would require someone to write and compile java code to the library just to add an item like potion, poison (insert any other consumable here.)
Having a single class, Item, and then an enumeration of the general type of item it is (weapon, consumable, armor, general) you can act on the item appropriately and invoke script routines appropriately when it is equip, or consumed or attacked with.