Correct, printing is considered a "side effect".
Type: Posts; User: helloworld922
Correct, printing is considered a "side effect".
methods are there to help abstract your code. They follow the mentality of the "black box": I give you something, you give me something back. How you go from what I give you to what you give me I...
The return statement returns values to be used in other code. println simply displays them to the console.
ex.:
// calculate x factorial
public static int factorial(int x)
{
int result =...