JAVA中 什么是方法签名?

编程知识 行业动态 更新时间:2024-06-13 00:21:56

what is method signature in java?
// 在 Java 中什么是方法签名?

书中是这么说的:
Definition: Two of the components of a method declaration comprise the method signature—the method’s name and the parameter types.

方法声明的两个组件构成了方法签名 - 方法的名称参数类型
example:
这里是一个典型的方法声明:

public double calculateAnswer(double wingSpan, int numberOfEngines,
                              double length, double grossTons) {
    //do the calculation here
}

上面方法的签名是:
calculateAnswer(double, int, double, double)

参考了几篇博客,知道了方法签名具体是个什么东东,以前都是模模糊糊就过去了,下面放几个博客的链接

https://blog.csdn/u010592926/article/details/76637936
https://blog.csdn/qiuchengjia/article/details/52910884

更多推荐

JAVA中 什么是方法签名?

本文发布于:2023-04-01 09:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/b91f16fc585dac3b657c3d78d68d8654.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   JAVA

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!