CloudKaptan interview question

Write a java code in reverse a string.