Signature (functions)

A function signature (or type signature, or method signature) defines input and output of functions or methods.

A signature can include:

In depth

undefined

Signatures in JavaScript

JavaScript is a loosely typed or a dynamic language. That means you don't have to declare the type of a variable ahead of time. The type will get determined automatically while the program is being processed. A signature in JavaScript can still give you some information about the method:

js
MyObject.prototype.myFunction(value);

Signatures in Java

In Java, signatures are used to identify methods and classes at the level of the virtual machine code. You have to declare types of variables in your code in order to be able to run the Java code. Java is strictly typed and will check any parameters at compilation time if they are correct.

java
public static void main(String[] args)

See also