Altus Group interview question

Technical java stuff