Solution: There are many ways to do it, some of them are:
Using for loop
Using recursion
Using StringBuffer
package sixDayProject;
public class ReverseStringExample {
public static void main(String[] args) {
String str = "Hello Shyam";
for(int i = str.length()-1; i>=0; i--) {
System.out.print(str.charAt(i));
}
}}