In computer programming, the return type (or result type) defines and constrains the data type of the value returned from a subroutine or method. In many programming languages (especially statically-typed programming languages such as C, C++, Java) the return type must be explicitly specified when declaring a function.
In the Java example:
public int someMethodthe return type is int. The program can therefore rely on the method returning a value of type int. Various mechanisms are used for the case where a subroutine does not return any value, e.g., a return type of void is used in some programming languages:
public void returnNothingFamous quotes containing the words return and/or type:
“I got my first clear view of Ktaadn, on this excursion, from a hill about two miles northwest of Bangor, whither I went for this purpose. After this I was ready to return to Massachusetts.”
—Henry David Thoreau (18171862)
“Under the species of Syndicalism and Fascism there appears for the first time in Europe a type of man who does not want to give reasons or to be right, but simply shows himself resolved to impose his opinions.”
—José Ortega Y Gasset (18831955)