public class Back { //number为要输入的数,返回的是倒叙后的结果 public int backFunction(int number) { StringBuffer temp = new StringBuffer( + number); int length = temp.length(); StringBuffer str = new StringBuffer(length); for (int i = length - 1; i -1 ; i++){ str.append(temp.charAt(i)); } return Integer.parseInt(str.toString()); } }