---
spec: JLS
title: "The Java Language Specification"
edition: "Java SE 15 Edition"
java_version: 15
chapter: "Chapter 8. Classes"
section: "8.8.4"
heading: "8.8.4. Generic Constructors"
parent: "8.8. Constructor Declarations"
source: https://docs.oracle.com/javase/specs/jls/se15/html/jls-8.html#jls-8.8.4
id: "8.8.4"
url: https://jvm.obfuscated.software/jls/se15/8.8.4.html
raw: https://jvm.obfuscated.software/jls/se15/8.8.4.md
---

# 8.8.4. Generic Constructors

A constructor is *generic* if it declares one or more type variables ([§4.4](4.4.md)).

These type variables are known as the *type parameters* of the constructor. The form of the type parameter section of a generic constructor is identical to the type parameter section of a generic class ([§8.1.2](8.1.2.md)).

It is possible for a constructor to be generic independently of whether the class the constructor is declared in is itself generic.

A generic constructor declaration defines a set of constructors, one for each possible invocation of the type parameter section by type arguments. Type arguments may not need to be provided explicitly when a generic constructor is invoked, as they can often by inferred ([§18 (*Type Inference*)](18.md)).

The scope and shadowing of a constructor's type parameter is specified in [§6.3](6.3.md) and [§6.4](6.4.md).
