write a reverse string program In java

 

public class RevStr{
public static void main(String args[]){
String name="Ganesh";
String str="";
for(int i=0;i<name.length();i++){
str=name.charAt(i)+str;
}
System.out.println(str);
}
}

Comments

Popular posts from this blog

Primary/Main features of Java

HTTrack ऑफलाइन वेबसाइट डाउनलोडर क्या है ?

Which language is used for Java?