J.III · Java 25 practice question

A developer examines a generic method declaration and wants to know where its type parameters are specified. Which section form does JLS SE 25 specify?

Choose one answer
Check answer and explanation

Correct answer: The same form as the type parameter section of a generic class

Explanation

The form of a generic method's type parameter section matches the form of a generic class's type parameter section.

Common trap

Claiming an annotation-only block is used misstates where type parameters are declared. Placing parameters at the end like arguments confuses type parameters with value parameters. Placing parameters at the end like arguments confuses type parameters with value parameters.

Source: JLS SE 25 §8.4.4. Generic Methods
Checked against the cited text on 2026-11-25.

Report an error in this question