Cognizant Interview Question

Reverse a given string in java