February 2014
Beginner
1248 pages
62h 25m
English
The entire body of our maximum method could also be implemented with two calls to Math.max, as follows:
return Math.max(x, Math.max(y, z));
The first call to Math.max specifies arguments x and Math.max(y, z). Before any method can be called, its arguments must be evaluated to determine their values. If an argument is a method call, the method call must be performed to determine its return value. So, in the preceding statement, Math.max(y, z) is evaluated to determine the maximum of y and z. Then the result is passed as the second argument to the other call to Math.max, which returns the larger of its two arguments. This is a good example of software reuse ...
Read now
Unlock full access