Agap2 interview question

Basic Java/Programming