string - Random Number Gen to give out a word with a button click -


i have been working on code so, once button clicked random word string shown in place of textview. have forgotten how it! have far.

                button genbnt = (button) findviewbyid(r.id.genbnt);     genbnt.setonclicklistener(new view.onclicklistener() {          @override         public void onclick(view v) {     random randomgenerator = new random();     int randomint = randomgenerator.nextint(100);      string wordlist[] = new string[30];      wordlist[0] = "word one";     wordlist[1] = "word two";     wordlist[2] = "word three";      int text = randomgenerator.nextint(30);     string wordtodisplay = excues[randomint];                }     }); } 

}

so have got string done, have forgotten go there, have gotten of code online.

thanks


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -