Ideas2IT interview question

Nested if from java and basic questions