java - String and imag array random in NetBeans? -


how can generate string , image array in netbeans? try make arrays like

string{"lion","cat","dog","bird"}; 

how can use random class s[i] i random?

string [] animals = {"lion","cat","dog","bird"}; int rndindex = (int)(math.random()*number_of_element); string rndanimal = animals[rndindex];

make array, random number between 0 , n inclusively n number of elements in array. retrieve element.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -