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:
“At twelve, the disintegration of afternoon
Began, the return to phantomerei, if not
To phantoms. Till then, it had been the other way:
One imagined the violet trees but the trees stood green,
At twelve, as green as ever they would be.
The sky was blue beyond the vaultiest phrase.”
—Wallace Stevens (18791955)
“Lise: Look, monsieur, I dont know what type of girl you think I am, but Im not. And now I would like to return to my friends.
Jerry: I thought you were bored with them. You sure looked it.
Lise: You should see me now.
Jerry: Ouch.”
—Alan Jay Lerner (19181986)