在做各种字符串封装的时候,不免用循环拼装字符串,如下:String [] arr= {"1","2","3","4"}; StringBuffer sb= new StringBuffer();...也就是说,我们要想办法去掉字符串的最后一个字符,解决方法有
在做各种字符串封装的时候,不免用循环拼装字符串,如下:
String [] arr= {"1","2","3","4"}; StringBuffer sb= new StringBuffer(); for(int i = 0; i