Question: Second, the portion represents a Generic. Generics allow an object to contain any object of a certain * type, so we can create a List
Second, the portion represents a Generic. Generics allow an object to contain any object of a certain
type, so we can create a List that contains Integers, Strings, or even other Lists. Why do we use Integer and
not int? Generics can only contain Objects, and not primitives, so we Integer because it is a Wrapper class,
the Object form of a primitive.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
