Java best way to write x = Math.max(x, newX)

前端 未结 0 1232
清酒与你
清酒与你 2021-01-18 14:49

I want to update x with a new value only when the new value is greater. What is the best way to write this? All of these seem a little long and messy.

x = Mat         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题