EPAM Systems interview question

Coding round, asked core java questions