The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2000



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.


Reversing A String

Posted by Chet Underwood, Esq. on January 23, 2002 at 4:06 AM

> hello,
> i hope you can help me plz,
> i would like to know how to Design and implement a Java program that reverses the String that the user types in, by using a loop and the charAt().
> i would be most grateful if anyone could help.
> thanx

This is impossible to do in Java, because Strings are immutable.

Post the code you have tried and we'll give you some pointers (or references).


Sponsored Links

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