Functions vs Methods

Mathematical FunctionsGeneral Java Methods
Always produce the same output for a given inputCan produce different values on each call (or no value at all)
Don't have any effect on other functionsCan have "side-effects"
Have strict inputs and outputsCan change their parameters

3 / 23