If-else statement in java