Science, Tech, Math › Computer Science Definition of a Java Method Signature Share Flipboard Email Print Tetra Images/Getty Images Computer Science Java Programming PHP Programming Perl Python Javascript Programming Delphi Programming C & C++ Programming Ruby Programming Visual Basic View More By Paul Leahy Paul Leahy Computer Science Expert M.A., Advanced Information Systems, University of Glasgow Paul Leahy is a computer programmer with over a decade of experience working in the IT industry, as both an in-house and vendor-based developer. Learn about our Editorial Process Updated on January 09, 2019 In Java, a method signature is part of the method declaration. It's the combination of the method name and the parameter list. The reason for the emphasis on just the method name and parameter list is because of overloading. It's the ability to write methods that have the same name but accept different parameters. The Java compiler is able to discern the difference between the methods through their method signatures. Method Signature Examples public void setMapReference(int xCoordinate, int yCoordinate){//method code} The method signature in the above example is setMapReference(int, int). In other words, it's the method name and the parameter list of two integers. public void setMapReference(Point position){//method code} The Java compiler will let us add another method like the above example because its method signature is different, setMapReference(Point) in this case. public double calculateAnswer(double wingSpan, int numberOfEngines, double length, double grossTons) { //method code} In our last example of a Java method signature, if you follow the same rules as the first two examples, you can see that the method signature here is calculateAnswer(double, int, double, double). Cite this Article Format mla apa chicago Your Citation Leahy, Paul. "Definition of a Java Method Signature." ThoughtCo, Aug. 26, 2020, thoughtco.com/method-signature-2034235. Leahy, Paul. (2020, August 26). Definition of a Java Method Signature. Retrieved from https://www.thoughtco.com/method-signature-2034235 Leahy, Paul. "Definition of a Java Method Signature." ThoughtCo. https://www.thoughtco.com/method-signature-2034235 (accessed June 5, 2023). copy citation