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 hate that word. It’s return—a return to the millions of people who’ve never forgiven me for deserting the screen.
    Billy Wilder (b. 1906)

    The real American type can never be a ballet dancer. The legs are too long, the body too supple and the spirit too free for this school of affected grace and toe walking.
    Isadora Duncan (1878–1927)