String str = "12345"; StringBuilder sb = new StringBuilder(str); System.out.println(sb.reverse().toString()); StringBuffer sbf = new StringBuffer(str); System.out.println(sbf.reverse().toString());
本文共 274 字,大约阅读时间需要 1 分钟。
String str = "12345"; StringBuilder sb = new StringBuilder(str); System.out.println(sb.reverse().toString()); StringBuffer sbf = new StringBuffer(str); System.out.println(sbf.reverse().toString());
转载于:https://my.oschina.net/u/138995/blog/293203