热心网友

StringBuffer的常用方法public int capacity()这个方法返回字符串缓冲区的当前容量。public synchronized StringBuffer reverse()这个方法反转字符串缓冲区中的字符串public int length()这个方法返回缓冲区中字符的个数public synchronized setLength(int newLength)这个方法设置字符串缓冲区的长度。public synchronized charAt(int index)这个方法返回字符串缓冲区中指定位置的字符public synchronized void setCharAt(int index,char ch)这个方法将字符串缓冲区中指定位置的字符设置为ch。

热心网友

import .*;public class daoxu{//类名public static void main(String args[]){BufferedReader br =new BufferedReader(new InputStreamReader( ));String string=" ";try{string= adLine();}catch(IOException ex){ intln(ex);}for(int i=string.length()-1;i=0;i--) int( arAt(i));}}