codice:
String tmp="CIAO";
String tmp2=""+tmp.charAt(tmp.length()-1)+tmp.substring(1,tmp.length()-1)+tmp.charAt(0);
;

Out = "OIAC";

Primo e ultimo carattere invertito.