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 emancipation of today displays itself mainly in cigarettes and shorts. There is even a reaction from the ideal of an intellectual and emancipated womanhood, for which the pioneers toiled and suffered, to be seen in painted lips and nails, and the return of trailing skirts and other absurdities of dress which betoken the slave-womans intelligent companionship.”
—Sylvia Pankhurst (18821960)
“There is a limit to the application of democratic methods. You can inquire of all the passengers as to what type of car they like to ride in, but it is impossible to question them as to whether to apply the brakes when the train is at full speed and accident threatens.”
—Leon Trotsky (18791940)