dimanche 11 juillet 2021

What is an operation's signature?

In the Design Patterns book [Gang of Four], Specifying Object Interfaces, page no. 13, it is mentioned that:

Every object declared by an object specifies the --

  1. operation's name
  2. the objects it takes as parameters
  3. 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?

Aucun commentaire:

Enregistrer un commentaire