package com.instaceofjava;

public class ReverseString {

public static void main(String[] args) {
String str="Hello world";

String revstring="";

for(int i=str.length()-1;i>=0;--i){
revstring +=str.charAt(i);
}
System.out.println(revstring);

}

}


Output: dlrow olleH

Instance Of Java

We will help you in learning.Please leave your comments and suggestions in comment section. if you any doubts please use search box provided right side. Search there for answers thank you.
«
Next
Newer Post
»
Previous
Older Post

No comments

Leave a Reply

Select Menu