Java 字符串反转
2016-10-28 17:02
274 查看
/** * Reverse 字符串反转 * @author Mitten_Crab * @date 2016年10月28日 下午 5:00:50 */ public class Reverse{ public static void main(String[] args) { String str = "Bring Watch"; String reverse = reverse(str); System.out.println(reverse); } // 使用 StringBuffer 的 reverse() 方法 public static String reverse(String str) { return new StringBuffer(str).reverse().toString(); } }
相关文章推荐
- Java技巧:字符串反转
- Java 输出反转字符串
- java实现字符串的反转 (如:输入abcd 输出dcba)见例解
- Java反转字符串代码
- Java反转字符串和相关字符编码的问题解决
- java给一个String 字符串反转
- java 字符串的反转
- 由字符串反转(使用递归)引申出来一道Java面试题
- Java 字符串反转实现
- java--让一个字符串反转
- 字符串反转-java
- java 字符串的反转输出
- java 反转字符串(转)
- JAVA字符串的反转和比较
- Java——模拟trim方法,与字符串反转
- Java技巧:字符串反转
- Java字符串反转算法实现
- java实现字符串反转
- java如何实现字符串的反转及替换
- Java 中把一个字符串反转