美文网首页
Java方法签名

Java方法签名

作者: lcwcloud | 来源:发表于2018-03-14 15:05 被阅读0次

    关于java的方法签名,官方给了定义:Definition: Two of the components of a method declaration comprise the method signature—the method's name and the parameter types. 方法声明的两个部分组成了方法的签名:1. 方法名 2. 方法所有的参数类型。

    官方还给了一个例子:

    public double calculateAnswer(double wingSpan, int numberOfEngines,

                                  double length, double grossTons)  {

                            //do the calculation here

    }

    这个方法的方法签名就是: calculateAnswer(double,  int , double, double)。

    相关文章

      网友评论

          本文标题:Java方法签名

          本文链接:https://www.haomeiwen.com/subject/meatfftx.html