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 String
s like "hello"
nor the boolean
values true
or false
.
To determine ...
Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.