EY interview question

core java