Cognizant Interview Question

reverse a string in java