@@ -0,0 +1,941 @@
+package com.naughtyzombie.ci.stringreverse;%0A%0A/**%0A * Created by pram on 02/07/2015.%0A */%0Apublic class ReverseString %7B%0A    public static void main(String%5B%5D args) %7B%0A        ReverseString rs = new ReverseString();%0A        String input = %22This is a test string to reverse%22;%0A        String output = rs.reverseString1(input);%0A        char%5B%5D output2 = rs.reverseString2(input.toCharArray());%0A        System.out.println(output);%0A        System.out.println(output2);%0A    %7D%0A%0A    private char%5B%5D reverseString2(char%5B%5D input) %7B%0A        for(int i = 0, j = input.length - 1; i %3C input.length / 2; i++, j--) %7B%0A            char c = input%5Bi%5D;%0A            input%5Bi%5D = input%5Bj%5D;%0A            input%5Bj%5D = c;%0A        %7D%0A        return input;%0A    %7D%0A%0A%0A    private String reverseString1(String input) %7B%0A        String reversed = %22%22;%0A        for(int i = input.length() - 1; i %3E= 0; i--) %7B%0A            reversed += input.charAt(i);%0A        %7D%0A        return reversed;%0A    %7D%0A%7D%0A

reverse string