Nasdaq interview question

Java program to reverse a string.