---
title: "Java: Generics"
date: 2015-01-01
description: "A generic is a"
canonical_url: https://idratherbewriting.com/java-generics/index.html
---

> For AI agents: a documentation index is available at https://idratherbewriting.com/llms.txt. Markdown versions of all pages are available by appending .md to any page URL.

# Java: Generics

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
