Skip to main content

Method Signature (Computer Science)

A Method Signature identifies a method. It consists of the method's name and its formal parameter list.

Example (Java)

In Java, the signature of a method is the method's name and its formal parameterlist12.

The signature of

public int intersects(int x, int y, int width, int height) {
// ...
}

is therefore:

intersects(int, int, int, int)

  1. "8.4.2. Method Signature", Java Language Specification (Oracle): https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.4.2 (retrieved 20. October 2023)
  2. "Defining Methods", The Java Tutorials (Oracle): https://docs.oracle.com/javase/tutorial/java/javaOO/methods.html (retrieved 20. October 2023)