Cognizant Interview Question

Java coding question on string reversal