wood burning stoves
The moose likes Java Micro Edition and the fly likes how to get reverse string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "how to get reverse string" Watch "how to get reverse string" New topic

how to get reverse string

nagarjuan pula

Joined: Sep 20, 2010
Posts: 9

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

Joined: Oct 05, 2010
Posts: 13
I think this will help you

String as="htapmas";
String temp="";
for(int x=as.length()-1;x>-1;x--){
Eduardo Yañez Parareda
Ranch Hand

Joined: Oct 09, 2008
Posts: 93

Or you can use http://download.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/java/lang/StringBuffer.html#reverse() to do that.

nagarjuan pula

Joined: Sep 20, 2010
Posts: 9
Thank you sampath.its working
I agree. Here's the link: http://aspose.com/file-tools
subject: how to get reverse string
jQuery in Action, 3rd edition