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\",
Java won't let you do that. You can do a hash lookup (which is overkill for this) or a case statement, or a big honking ugly multiple compare:
if ((n==1 ) || (n==2) || ...