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:

    Live within your means, never be in debt, and by husbanding your money you can always lay it out well. But when you get in debt you become a slave. Therefore I say to you never involve yourself in debt, and become no man’s surety. If your friend is in distress, aid him if you have the means to spare. If he fails to be able to return it, it is only so much lost.
    Andrew Jackson (1767–1845)

    The ideal American type is perfectly expressed by the Protestant, individualist, anti-conformist, and this is the type that is in the process of disappearing. In reality there are few left.
    Orson Welles (1915–1984)