Get Adobe Flash player

Saturday, January 14, 2012

String reverse

class StringRever{
public static void main(String args[]){
String str="Hello World";
for(int i=str.length()-1;i>=0;i--)
System.out.print(str.charAt(i));
}
}


Output:



dlroW olleH

0 comments:

Post a Comment