Persistent Systems interview question

Java code to print the reverse string