What is a method's signature?
-
The signature of a method is the name of the method the type of its return value.
-
The signature of a method is the name of the method and the names of its parameters.
-
The signature of a method is the name of the method and the data types of its parameters.
-
The signature of a method is the name of the method, its parameter list, and its return type.
A method's signature consists of the method name and the data types of its parameters (in order). This uniquely identifies overloaded methods. The return type is NOT part of the signature in most languages (Java, C++). Parameter names don't matter for overloading resolution, only their types.
A method's signature in Java is made up of its name and the data types of its parameters — nothing else. The return type is deliberately excluded from the signature (that's why two methods can't be overloaded by return type alone), so 'name, parameter list, and return type' is not the correct definition.