Course contentsShow
Java
Lesson 958 of 2,87022. Generics: Bounds and WildcardsPro lesson

Cannot Instantiate Generic Types with Primitives

Understand why List<int> is invalid and must use List<Integer>, due to type erasure and primitives not being reference types.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.