Continental interview question

Mostly core java