If statements in java

balkanbalkan

New Member
This may be a simple question but...In java is it possible to check if an integer for example is equal to one or another values without repeating the variables check..e.g. This should work\[code\]int n = 0;if ((n == 1) || (n == 2)) {//do stuff}\[/code\]but is it possible to create something like this?\[code\]int n = 0;if (n == 1 || 0) {//do stuff}\[/code\]
 
Top