A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Finding the maximum between 3 values II
Joined: Nov 21, 2004
Nov 12, 2005 03:37:00
If i am using Math.max(a, Math.max(b, c)) , but, say, b and c are the same and are both bigger than a, then which does it chose to return?
Moosey knows best
Joined: Mar 22, 2005
Nov 12, 2005 04:27:00
Since they're primitives, not objects, there is no concept of returning one or the other. They're indistinguishable from each other, and from all other variables having the same value.
Ping & DNS, my free Android app for network diagnostics
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Finding the maximum between 3 values II
Kathy's book - chapter 6 - question #7
compare three double numbers
pick the largest, second and third number from an array
Finding the maximum between 3 values?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014