Looks like it might work. Write a loop and print out the returned value a few times to see what you get.
No need to create a new Random object everytime you want a number. Make rangen a class...
Type: Posts; User: Norm
Looks like it might work. Write a loop and print out the returned value a few times to see what you get.
No need to create a new Random object everytime you want a number. Make rangen a class...
Use the Random class's method to choose an index value between 0 and the length of the array-1