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:

    The traveller who has gone to Italy to study the tactile values of Giotto, or the corruption of the Papacy, may return remembering nothing but the blue sky and the men and women who live under it.
    —E.M. (Edward Morgan)

    It took six weeks of debate in the Senate to get the Arms Embargo Law repealed—and we face other delays during the present session because most of the Members of the Congress are thinking in terms of next Autumn’s election. However, that is one of the prices that we who live in democracies have to pay. It is, however, worth paying, if all of us can avoid the type of government under which the unfortunate population of Germany and Russia must exist.
    Franklin D. Roosevelt (1882–1945)