Generating random numbers in eclipse -


i supposed write private helper method generates random numbers between 1- 60.the method supposed checks see if array numbers contains the newly generated number number. if it’s in numbers, it need to regenerate it again numbers in array have unique.

here code

private void generate(int index) {         random rand = new random();         (int = 0; <= 6; i++) {              int num = rand.nextint(61) + 1;     index = num;         } 

i dont know go here.


Comments

Popular posts from this blog

vb.net - How to ignore if a cell is empty nothing -

Sort a complex associative array in PHP -

recursion - Can every recursive algorithm be improved with dynamic programming? -