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:
“The soul establishes itself.
But how far can it swim out through the eyes
And still return safely to its nest?”
—John Ashbery (b. 1927)
“Histories of the world omitted China; if a Chinaman invented compass or movable type or gunpowder we promptly forgot it and named their European inventors. In short, we regarded China as a sort of different and quite inconsequential planet.”
—W.E.B. (William Edward Burghardt)