Capital One interview question

Mostly core java related questions