What's wrong with my logic (Java syntax) <p>I'm trying to make a simple program that picks a random number and takes input from the user. The program should tell the user if the guess was hot (-/+ 5 units) or cold, but I never reach the else condition.</p> <p>Here's the section of code:</p> <pre><code> public static void giveHint (int guess) { int min = guess - 5; int max = guess + 5; if ((guess &gt; min) &amp;&amp; (guess &lt; max)) { System.out.println("Hot.."); } else { System.out.println("Cold.."); } } </code></pre>