IfElse java code example