//Original String String
originalString = "Hello World";
//Create a StringBuffer from the original string
StringBuffer buffer = new StringBuffer(originalString);
//Reverse the contents of the StringBuffer
buffer = buffer.reverse();
//Convert the StringBuffer back to a String
String reverseString = buffer.toString();
//Print the original and reverse string
System.out.println("original: " + originalString);
System.out.println("reverse : " + reverseString);