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:
“When we suffer anguish we return to early childhood because that is the period in which we first learnt to suffer the experience of total loss. It was more than that. It was the period in which we suffered more total losses than in all the rest of our life put together.”
—John Berger (b. 1926)
“Writing is more than anything a compulsion, like some people wash their hands thirty times a day for fear of awful consequences if they do not. It pays a whole lot better than this type of compulsion, but it is no more heroic.”
—Julie Burchill (b. 1960)