Check if value is greater than zero in Java
<p>Let me start off my saying I'm an <strong>absolute beginner in Java</strong>, and what I've put together so far has taken me a loooong time.</p>

<p>So with that in mind, I have this snippet of my code which checks whether the user has entered a byte value, and shows an error message if they haven't:</p>

<pre><code>while (!keyboard.hasNextByte()) {
     keyboard.next();
     System.err.print("Error, try again: ");
 }
</code></pre>

<p>What I'd like to add is one more condition which checks if the user has entered a value greater than zero. So something along these lines:</p>

<pre><code> while (!keyboard.hasNextByte() &amp;&amp; keyboard &gt; 0) {
</code></pre>

<p>How would I do that? I would also appreciate an explanation of the answer so I can learn more that way. Ta</p>