Capgemini Interview Question

Code in Java for strings and array