If statements in java
<p>This may be a simple question but...</p>

<p>In java is it possible to check if an integer for example is equal to one or another values without repeating the variables check..</p>

<p>e.g. This should work</p>

<pre><code>int n = 0;
if ((n == 1) || (n == 2)) {
//do stuff
}
</code></pre>

<p>but is it possible to create something like this?</p>

<pre><code>int n = 0;
if (n == 1 || 0) {
//do stuff
}
</code></pre>
