• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Finding the maximum between 3 values II

 
Sam Bluesman
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Thanks
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic