Capital One interview question

Java related and spring related