As a 1st year college IT student, I have a Java assignment where I must display three random generated numbers and order them highest, second highest, lowest. The challenge given by our professor is to not use any conditional statements or arrays. Here is the code: The problem I am facing is that I am struggling to get the “in-between”
Tag: max
java Integer.MAX_VALUE, MIN_VALUE overflow
Ok maybe I am just tired because of this but how can I accomplish this? // or perhaps I just want the if statement to catch if x is “within range” kinda like this: But the problem is that if the value is as mentioned above, like MAX_VALUE + 10, the value ends up being neither higher than the MAX