vendredi 23 octobre 2015

User random with html button

i'm using successfully random like this:

Random pickName = new Random();
User random = users.get(pickName.nextInt(users.size()));

At the moment it shows me the result in my command line everytime i load the page (the random code is in my servlet). My question is:

How can i make a html button which starts the random function and displays me the randomly selected names? Just need an example.




Aucun commentaire:

Enregistrer un commentaire