# Reverse a String

Today I have solved reverse a string problem on GFG. We regularly solve it by using for loop but today I have decided to solve it using another method hence I have used StringBuilder class to solve it it is very easy. You just need a little bit knowledge about StringBuilder Class. See the following code for more information if you like it please follow my account for such amazing coding questions answers.

```java
class Reverse
{
    public static String reverseWord(String str)
    {
       StringBuilder s1 = new StringBuilder();
       s1.append(str);
       
       s1.reverse();
       
       return s1.toString();
       
    }
}
```
