|
[Java] String randomization example
|
|
02-16-2010, 11:34 PM
(This post was last modified: 02-16-2010 11:46 PM by Alphablend.)
Post: #1
|
|||
|
|||
|
[Java] String randomization example
The task was to make a program which requires user's input of length of the array. Elements of that array are strings which are randomly generated. The length of every string is a random value from range 0-20. The probability of getting the upper case letter is twice bigger than the lower case letter.
I did a similar example in Python: [Python] Function for random String Code: import java.util.Random;This is what you get when you try out the program: Code: Enter length of the array: |
|||
|
02-16-2010, 11:47 PM
Post: #2
|
|||
|
|||
|
RE: [Java] String randomization example
Very good task and interesting solution. It is good to see a task with probability !
There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
« Next Oldest | Next Newest »
|






