Both fields and methods have signatures within the Java class file. They are a shorthand to describe the type (of a field) and the return type and parameters (of a method). Signatures are constructed using characters or strings to represent the various data types. The signature of a field is simply the character or string representing its datatype.
The signature of a method is a pair of parentheses enclosing a list of the characters or strings representing the datatypes of the parameters, separated by semicolons. The parentheses are followed by the datatype of the return type of the method.
See Data Type Representations in Method Signatures indicates how data types are represented by characters or strings.
L<classname> 1 |
|