BMC Software interview question

Reverse string in java