Return Type

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 someMethod

the 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 returnNothing

Famous quotes containing the words return and/or type:

    I believe in the brotherhood of man, all men, but I don’t believe in brotherhood with anybody who doesn’t want brotherhood with me. I believe in treating people right, but I’m not going to waste my time trying to treat somebody right who doesn’t know how to return the treatment.
    Malcolm X (1925–1965)

    To put it rather bluntly, I am not the type who wants to go back to the land; I am the type who wants to go back to the hotel.
    Fran Lebowitz (b. 1951)