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 -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -