Java examples for java.lang:String Algorithm
reverse a String without using StringBuilder
//package com.java2s; public class Main { public static String reverse(String s) { String ret = ""; for (int i = s.length() - 1; i > 0; i--) { ret += s.charAt(i);//www .ja v a2 s. co m } return ret; } }