How does using generics with a specific type (like <Potion>) affect the Inventory class behavior?
<Potion>
Inventory
It restricts the inventory to only store potions, providing type safety.
It allows the inventory to store any type of item without restrictions.
It has no effect; generics are purely syntactical and do not influence runtime behavior.
It makes the inventory class incompatible with the Item class.
Item