In the Design Patterns book [Gang of Four], Specifying Object Interfaces, page no. 13, it is mentioned that:
Every operation declared by an object specifies...
- the operation's name,
- the objects it takes as parameters,
- and the operation's return value.
Please help me understand why 3) return value is part of the operation/method signature?
In a language such as Java, return type is not part of the method signature. Also is return value part of method signature in java?