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
Posted by: InstanceOfJava Posted date: Dec 6, 2014 / comment : 0
Tagged with: Java Programs
We can create CSV file and fill some data in to it using java program. We can create CSV file and ...Read more »
17Aug2016Array is collection of similar data types. Arrays can hold collection of data with indexes We alre...Read more »
15Aug2016Towers of Hanoi is a famous game. In this game there are three poles and N number of disks p...Read more »
15Aug2016We can develop interfaces by using "interface" keyword. A class will implements all the met...Read more »
24Jul2016Notepad is a text editor from windows operating system. We use notepad for writing text files. We ...Read more »
22Jul2016
No comments