Tag - nested if condition in java with example