The Java® Language Specification, Java SE 7 Edition, Fourth Edition
by James Gosling, Bill Joy, Guy Steele, Gilad Bracha, Alex Buckley
8.4. Method Declarations
A method declares executable code that can be invoked, passing a fixed number of values as arguments.
MethodDeclaration: MethodHeader MethodBodyMethodHeader: MethodModifiersopt TypeParametersopt Result MethodDeclarator ThrowsoptMethodDeclarator: Identifier ( FormalParameterListopt )
The FormalParameterList is described in §8.4.1, the MethodModifiers clause in §8.4.3, the TypeParameters clause in §8.4.4, the Result clause in §8.4.5, the Throws clause in §8.4.6, and the MethodBody in §8.4.7.
The Identifier in a MethodDeclarator may be used in a name to refer to the method.
It is a compile-time error for the body of a class to declare as members two methods with override-equivalent signatures (§8.4.2).
The ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access