When a method does a calculation, you usually want it to send the result back. The return type in the method signature tells Java what kind of value comes back.
Here is a method that doubles an integer:
public static int doubleValue(int x) {
return x * 2;
}
The word int before the method name means this method promises to return an int. The return statement sends that value back to wherever the method was called. If you declare a return type of int but forget the return statement, the compiler will reject your code.
You can use any data type as a return type: double, String, boolean, or even an array.