EPAM Systems interview question

Two coding que and some java questions