Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Using java to scramble letters
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Neospud




PostPosted: 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
Sponsor
sponsor
[Gandalf]




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: