• Post Reply Bookmark Topic Watch Topic
  • New Topic

strings  RSS feed

 
gayathriy Nandakumar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi.. consider
StringBuffer codestring="abcdefghijkl"..for each element in codestring how do i swap it with the element of a randomly generated index
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, you should take a look at this tutorial about Strings and StringBuffers. This should give you a good introduction to the tools available to solve this task. You should also familiarize yourself with the Java API docs. This will give you a handy reference to the classes and methods available from the standard Java API. It is certainly worth your time to learn how to navigate this. For now, you should start by finding the classes in the java.lang package since that is where String and StringBuffer are located.

Layne
 
abhijit Ohal
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Mike Noel
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are still having problems after you have familiarized yourself with the classes Layne suggested then post your partial solution here and we'll help you figure it out the rest of the way.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!