I am making a raffle type program using java. I ask the user for the name of the entrant and number of entries. Once all the entries are in, a random number generator will pick a random number, and the entrant that relates to that number is the winner. So far, this is what I have:
The two problems I am running into are (1) how do you save a variable outside a while loop? and (2) How do I get my while loop to save each user and entry separately and at the same time add them up and put them into the drawing?