0
Beginning oop java arrayList help
I am working on lucky game guess with prizes if the user and the random generator have the same number they will win a prize the problem i have is when the two number matches the prize isnât printing like I havenât won anything. I have to store the prizes and there worth in arrayList. And i donât how.
4 Answers
+ 1
Mohannad you can save your code on Sololearn and provide a link here in comment. Then others can review and give more specific advice.
Only saying that your code is long, doesn't give too many clues how to help you
0
Can you store only worthies ?
100, 250, 150
0
zemiak I already stored prize name and the worth but when the user number and the random number matches print a specific prize i.e. if the user choose 1 and random 1 print prize1 and when 2 print prize2 . Its a bit long code
0
when prize 1 was used
0,1,2,3,4 // index
a, ,c,d,e // prize
what is your plan, shift rest of array left ?
0,1,2,3 // index
a,c,d,e // prize