Example:
int value = someValue; if (value == (valueOne OR valueTwo OR valueThree)){ //do code }
I would like to avoid re-typing value
value
You can't do this with if statement in Java, but with the switch statement.
if
switch
switch (value) { case 1: case 2: case 3: { //do something } }
This will check if the value is equal to 1, 2 or 3.
1
2
3