# Generics

*noun*

say it: **“juh-NAIR-iks”** **/dʒəˈnɛrɪks/**

Writing a class or method once with a placeholder type that is filled in when it is used.

## What are **generics**?

**Generics** let you write a class or method once, with a placeholder type (usually `T`), and fill the type in when it's used: one `Shelf<T>` serves as a shelf of snacks or a shelf of numbers. Read the angle brackets as "of": `List<Snack>` is "a list of snacks". C#, Java and TypeScript check the type; Python and JavaScript don't need the label.

## In a sentence

- “With **generics**, one shelf class holds snacks in one place and prices in another.”

Level: Journeyman · [More Software Development terms at this level](https://www.ask-codey.com/glossary?category=software-development&level=3)

Updated: November 9, 2026

## In other subjects

- [Generics in C#](https://www.ask-codey.com/glossary/generics-c-sharp)
- [Generics in Java](https://www.ask-codey.com/glossary/generics)

Source: https://www.ask-codey.com/glossary/generics-software-development
