import java.util.*;
import java.lang.*;
import java.io.*;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) {
String str = "Prasenna Swathe";
stringrev(str);
}
public static StringBuilder stringrev(String s){
StringBuilder sb = new StringBuilder(s);
System.out.println("Reversed String: "+sb.reverse());
return sb;
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: