A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
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
- updated with new look and Ping home screen widget
I agree. Here's the link:
subject: Finding the maximum between 3 values II
pick the largest, second and third number from an array
Kathy's book - chapter 6 - question #7
compare three double numbers
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