The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Like this (I think)

Posted by Chloe on January 22, 2002 at 8:25 AM

Say the String is called text, it would be something like this:


String reversed;

for (int i = text.length(); i >= 0; i--) {
reversed += text.charAt(i);


I think! I don't have a copy of Java on this computer so I can't test that, but I think it should work. If not you get the general idea.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us