simple example of nested if else statement in java