How to random java string array , that each array will be true random? -


this question has answer here:

i have java string array looks :

string [] cards = {"c1","c2","c3", , , , , , ,, , "c45"}; 

so have there 45 elements , rendom them each time :

int[] cards2  = arrays.copyof(cards , cards .length); random(cards2); 

how should random function ?

you can use

collections.shuffle(arrays.aslist(cards)); 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -