public static String reverseStr(String str) { int len = str.length(); char ch[] = str.toCharArray(); int begin = 0,end = len-1; char temp; while(begin<end) { temp = ch[begin]; ch[begin] = ch[end]; ch[end] = temp; begin++; end--; } return new String(ch); }
新浪微博:http://weibo.com/cwtree
优酷空间:http://i.youku.com/u/UMzEzODI0NTQ4