Using java to scramble letters
Author |
Message |
Neospud
|
Posted: Tue Oct 17, 2006 5:44 pm Post subject: Using java to scramble letters |
|
|
What class would i need to look at in order to scramble the letters in a word but leave the first and last unchanged. (I.E. Question changed to Qeitousn) |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
[Gandalf]

|
Posted: Tue Oct 17, 2006 5:59 pm Post subject: (No subject) |
|
|
This is one of those things that no built in method exists for (as far as I'm aware). Here, you're going to have to use simple string and character manipulation along with random number generation. That's quite a few things, so let me outline what you'll generally need to know:
-> How to generate a random number between a minimum and maximum.
-> How to change the character at a specified index in a String.
-> How to convert from integers to characters.
-> More generally, how objects (Strings) work in general, for loops, possibly arrays. |
|
|
|
|
 |
|
|