EPAM Systems Interview Question

Coding round, asked core java questions