Deloitte Interview Question

Reverse the string in Java