File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get reverse string

 
nagarjuan pula
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can any one can explain how to display the given string as reverse string. if you have example code post that.

thanks in advance.
 
sampath premarathna
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this will help you

String as="htapmas";
String temp="";
for(int x=as.length()-1;x>-1;x--){
temp+=as.charAt(x);
}
System.out.println(temp);
 
Eduardo YaƱez Parareda
Ranch Hand
Posts: 93
IntelliJ IDE Java VI Editor
 
nagarjuan pula
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you sampath.its working
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic