Hey guys,
I need your help. I need to write a Java program for a simulation for a lottery. I got so far as I got numbers and everything. But how can i make sure that there is no number going to be there twice?
Thanks for your help
Julie
Juliane123 0
Newbie Poster
Recommended Answers
Jump to PostCould you use an Else If type thing.
Jump to Postput all lottos numbers in an array and search through it....
use a do-while loopmake sure to initialize your array to something that would be invalidlike 0 to avoid a null pointer exception
All 5 Replies
OurNation 5
Master Poster
paradox814 1
Posting Whiz
Ghost 0
Posting Whiz
Mogster 0
Newbie Poster
Narue 5,707
Bad Cop Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.