Java - The diamond syntax (<>)

> Procedural Languages > Java

Table of Contents

1 - About

The diamond syntax (<>) let the compiler infer the generic type parameters.

The diamond operator makes dealing with generics easier by avoiding repeating types when they can easily be inferred at compilation time.