Capgemini interview question

To print reverse string in java