Deloitte interview question

Reverse the string in Java