方法签名

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.net/u010592926/article/details/76637936

https://blog.csdn.net/qiuchengjia/article/details/52910884

---------------------

作者:EasyBoolean

来源:CSDN

原文:https://blog.csdn.net/liu_sisi/article/details/88368846

版权声明:本文为博主原创文章,转载请附上博文链接!

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 关于java的方法签名,官方给了定义:Definition: Two of the components of a...
    lcwcloud阅读 1,745评论 0 0
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,486评论 0 10
  • 一、基本数据类型 二、引用数据类型 注意:1、引用数据类型则不能直接使用,需要根据JNI函数进行相应的转换后,才能...
    程序员学园阅读 17,762评论 1 7
  • 动态解析实例方法 void walk(){ NSLog(@"%s",__func__);}+ (BOOL)res...
    hie阅读 150评论 0 0
  • 我们这一生,一路坎坷,一路磨难,总会经历什么让我们从涉世未深到后来的看透人间冷暖。有些人变了,并不是他们的内心变得...
    愛石屋阅读 420评论 0 1