Method maximum
In maximum’s declaration (lines 28–41), line 28 indicates that it returns a double value, that the its name is maximum and that it requires three double parameters (x, y and z) to accomplish its task. Multiple parameters are specified as a comma-separated list. When maximum is called (line 21), the parameters x, y and z are initialized with the values of arguments number1, number2 and number3, respectively. There must be one argument in the method call for each parameter in the method declaration. Also, each argument must be consistent with the type of the corresponding parameter. For example, a double parameter can receive values like 7.35, 22 or –0.03456, but not Strings like "hello" nor the boolean values true or false.
To determine ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access