I need a user to enter a word and the code to swap the first and last char in the string e.g. 'hello' should output 'oellh'
public void compute(){
for (int i = 0; i < name.length(); i++){
if (name.length() > 2 ) {
}
else {
strBuff.append(name.charAt(i));
}
}