Science Fair Project Encyclopedia
Return type
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 this example, the return type is int. This means that when that method is completed, it will return a value of type int.
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.
03-10-2013 05:06:04
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
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


