Inventory of objects with item types and quantities
Yes, having a quantity field in Item is bad design.
The reason is that it is the wrong abstraction. If you pick up and hold ten pebbles in your hand, the number ten is a property of your hand (because it is how many things it is holding), not the pebble which is just a pebble.
Consider if you drop all the pebbles, now the quantity of pebbles in your hand changes to 0. But if the quantity was a property of the pebble, and you dropped all the pebbles how would you model that would each of the pebbles have a quantity of 0 now?
What if you hand the pebbles over to some one else? Then you would change the quantity in respective hand, but if the quantity was part of the pebble you couldn't model this transaction at all.
Similarly the quantity should be a property of the inventory (how many of X does it contain), not of the Item which is just an item.
Somehow this makes me think of Database Normal Forms.
Simply have a Map with Item as key and an Integer quantity as value. This solves your duplicate items problem as well.
Map&lt;Item, Integer&gt; inv = new HasMap&lt;&gt;();

// add x of item ( works for new items too )
inv.put(item, inv.getOrDefault(item, 0) + x);

Note that you will need to implement equals and hashCode for Item.