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:

    Were not ten made clean? But the other nine, where are they? Was none of them found to return and give praise to God except this foreigner?
    Bible: New Testament, Luke 17:17,18.

    Jesus, after healing ten lepers.

    We have two kinds of “conference.” One is that to which the office boy refers when he tells the applicant for a job that Mr. Blevitch is “in conference.” This means that Mr. Blevitch is in good health and reading the paper, but otherwise unoccupied. The other type of “conference” is bona fide in so far as it implies that three or four men are talking together in one room, and don’t want to be disturbed.
    Robert Benchley (1889–1945)