Saturday, 22 June 2013

Reverse of a String

//reverse of a string
import java.lang.*;
class test
{
    public static void main(String[] args)
    {
        String s="hi how are you yogi";
        for (int i=s.length()-1;i>=0 ;i-- )
        {
        System.out.print(s.charAt(i));

        }
    }
}