HCLTech Interview Question

String reversal in java