Pregunta de entrevista de Optiver

Object-oriented programming question in Java