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
Learn java with passion!
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