Capgemini Interview Question

reverse the string using java code