Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 279 Bytes

generics.md

File metadata and controls

15 lines (10 loc) · 279 Bytes

Generics

Certain types of classes, like growable arrays, are simply holders of data.

That is, almost none of how they work has to change to store different kinds of data.

Generics help us make these generically useful containers.

class Box<T> {
    T value;
}