Lottery number generator - Java Example

preview_player
Показать описание
We generate 6 numbers out of 49 numbers. We have to check that a drawn number is not repeating all the previously drawn numbers. We sort the results finally.

You'll learn most by trying my code while watching the video.

Please post your improvement on my code on the comments.

Concepts:
do-while loop
for loop
Random class
Array

Playlist of my Java course

Playlist of my Java examples
Рекомендации по теме
Комментарии
Автор

loved the video, now i can continue with my project...…..thank

tebalelomashegoane
Автор

Thank you for the tutorial!! You do a great job in explaining each line of code.

leeeeooooon
Автор

This is exactly what i needed, thank you.

Ens_wei
Автор

thanks a lot! very clear video, was a big help!

ayayay
Автор

This tutorial was very useful! One question, what do you mean by indexDrawn?

temiowolabi
Автор

Well executed coding.
Can you prepare program that produces random numbers based on input of previous winning numbers?

harrishenry
Автор

how can i list all possible combinations?
and of these possible how can I define a condition to eliminate them from these generated?

prototipagemmecanica
Автор

lotteryArray[k] simply means which slot it draws from 1 to 6 and not the number it draws. so how can it lotteryArray[k]== randomNumber?

wenkaiyang
Автор

How can I make a lottery program that takes 3 number from user and displays 8 random numbers (any range maybe 1-100). And tell what numbers from user matches the lottery numbers without using loops and arrays.

harkiratsingh
Автор

is there any way to make the code use methods like getNumber() to get the numbers and a method like sort() to sort them?

sheldonwatt
Автор

hello I hope you can notice me, can you teach me how to program lotteru draw with 6 generated numbers and no repetition number

simplelife
Автор

I want you taught download programs java

จุฑามาศพิบูลย์
Автор

Well a little bit more complicated then I thought haha

don
Автор

Hello Can you make a bingo game draw 1 to 75 without repeat thanks

RandomVideos
join shbcf.ru