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:

    “... in spite of everything, I still believe that people are really good at heart. I simply can’t build up my hopes on a foundation consisting of confusion, misery, and death. I see the world gradually being turned into a wilderness, I hear the ever approaching thunder, which will destroy us too, I can feel the sufferings of millions and yet, if I look up into the heavens, I think that it will all come right, that this cruelty too will end, and that peace and tranquillity will return again.”
    —Anne Frank (1929–1945)

    “The perfect detective story cannot be written. The type of mind which can evolve the perfect problem is not the type of mind that can produce the artistic job of writing.”
    —Raymond Chandler (1888–1959)