A generic is a “parameterized” class that can work with more than one type of object. You specify the type of object it can work with when you instantiate the class.

Most commonly, you use the ArrayList class in its generic form.

Eclipse example: generics


Get new posts delivered straight to your inbox.

Subscriber count: 3,220