Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
how to print string in reverse Posted by navnathshete on 2 Oct 2009 at 9:40 PM
how to print string in reverse
Report
Re: how to print string in reverse Posted by velius on 4 Oct 2009 at 5:28 PM
You should start here -> Java Online Documentation

You will see that the string class only has one way and that's using char getAt(int index).


We'll be an army of theives
Of self-freed slaves
Of mild-mannered maids
We'll fight with whispers and blades
So get ready, a new day is dawning
- The New Wild West -- Jewel
Report
Re: how to print string in reverse Posted by codebeach on 5 Oct 2009 at 12:19 PM
You can use the reverse method on the StringBuffer class. Here is a tutorial on using the StringBuffer to reverse a string:

http://blog.codebeach.com/2007/09/reverse-string-in-java.html



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.