Functions vs Methods
Mathematical Functions | General Java Methods |
---|---|
Always produce the same output for a given input | Can produce different values on each call (or no value at all) |
Don't have any effect on other functions | Can have "side-effects" |
Have strict inputs and outputs | Can change their parameters |
3 / 23