I have no Java experience and am looking for help to create the source code for a lottery game to teach students. Here is what I am trying to accomplish…I appreciate any help just don’t know any Java programmers who can write the source code for me.
A lottery requires that you select six different numbers from 1 to 49. Generating random numbers using the random() static method of class Math. It returns a double so you will need to cast it as an integer. If you set the range to 49, you can generate a random number between 1 and 49 that you need 5 sets of numbers and in each set you have should have six different numbers. There should not be duplicate numbers within each set. Of course the same number can occur in multiple sets, but within the same set of 6 numbers it should only occur once, if at all. Here is an example of a valid set of numbers: