What is the advantage of using generics for a class like Inventory<T extends Item>?
Inventory<T extends Item>
It can store any type of objects and doesn't need to be specified at runtime.
It makes the code more complex and difficult to read.
It provides compile-time type safety and eliminates the need for type casting.
It automatically converts between different types of collections.