Module 12: Generics and Type Safety
Bounded Type Parameters
Use upper and lower bounds to restrict acceptable types.
Upper bounds (<T extends Number>) limit types to Number or subclasses—enables numeric operations.
Lower bounds (? super T) support contravariance for consumers (e.g., Comparator<? super T>).
Remember PECS: Producer extends, Consumer super.