You return a value to another method.
like what happens in these sub-methods
example
SYNTAX: modifier + type + methodName + () + { + }
You return the value in the sub-methods (line 6 and 13); to start method (line 17)
int difficultSum1() {
int q = 30;
int r = 10;
int a = 10 + 30*q;
int z = q * q + a;
return a * q + q;
}
int difficultSum2 () {
int m = 20;
int s = 30 + 60 * m;
int l = s + s * m;
return m * s * l;
}
void start() {
int result = difficultSum1() + difficultSum2();
System.out.println("This is the result: " + result);
}