My problem is that program is not reading codes as i intended \"he\" would.
I have
if (hero.getPos() == (6 | 11 | 16)) {
move = new Object[] {\"Up\",
The other answers are correct, just thinking differently you may use Sets.
static final Set positions = new HashSet();
static{
positions.add(6);
positions.add(11);
positions.add(16);
}
if (positions.contains(hero.getPos())){
move = new Object[] {"Up", "Right", "Left"};
} else {
move = new Object[] {"Up", "Down", "Right", "Left"};
}