This is most common questions asking now day to Android ,Java developers and technical interviews. There is several different ways to Reverse string.

Here is example for better understanding :

Original String : “Hello”

Revers String : “olleH”

Original String : “My name is rohit”

Revers String : “tihor si eman yM”

Take String form console

1. Using for loop

2. Using StringBuilder

 

Leave a Reply