Science Fair Project Encyclopedia
The Return type constrains the resulting value from calling a method or function. It must be explicitely mentioned when declaring a function in many of the high-level programming languages, such as Java, C++, C, Prolog and many others.
A Java example could be:
public int someMethod()
In Java, the return type can be any object or interface type, or any of the primitive types. An example of a Java object type is java.lang.String, whereas char is a primitive Java type.
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details