TCS interview question

Java string reverse program was asked