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

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -