I'm trying to transfer the last character of a StringBuffer to the beginning by using StringBuffer.insert(). I want to be able to do this even if I don't know the word in advance.
I tried to transfer the letter using the insert() and length() methods below, but it did not work.
StringBuffer str3 = new StringBuffer("Colour");
System.out.println(str3.insert(0,str3.length()));
// output is "6Colour"