Is there a built-in function in java that would convert any negative number to a 0? what i’m wanting to do is subtract number from a variable, and ensure that it doesn’t go below 0. is this possible with built-in functions or would i have to write my own?
Share
You should use :
You don’t need a built-in function for that.