Definition of a method signature?

前端 未结 7 1946
萌比男神i
萌比男神i 2020-12-08 10:32

What is the correct definition of a method signature (or a signature of a method)?

On google, I find various definitions:

It is the combinatio

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 11:04

    In your example above the method signature is Foo(int x, int y). This is important to know because in languages which allow method overloading (such as C# and Java), the method name will be the same, but the signature must be different.

提交回复
热议问题