Capgemini Interview Question

Coding under core JAVA basic