If you think a while() loop is going forever, add a println() inside of all the while loops.
Type: Posts; User: Norm
If you think a while() loop is going forever, add a println() inside of all the while loops.
Start adding some println statements to find where it is happening.
I thought you wanted to find why the program "stops"?
If the program is not stopping now, can you explain what the current problem is?
That is because the shuffle() method changes the data...
Is that related to the "it stops" problem? Have you found the last statement that executes before the program "stops"?
Changing the data every time the program executes sometimes makes it hard...
It wouldn't if you had done what was suggested on the other site: Get rid of the shuffle. Have fixed user input.
What are the last statements executed for each time it "stops"?
I suggest that you "fail to see" because you are a beginner.
Then you need to add LOTS more printlns that show where the code is executing and what the values are as it executes.
What is the...
How many years of programming experience do you have?
Can you copy the full contents of the console from when you execute the program that has all the output from the print statements you...
Yes, those suggestions were for doing some debugging to find the problem. They would NOT fix the problem.
If the code now executes the same way every time (no random input and with a fixed deck),...
It's considerate to say where a problem has been posted so everyone that is trying to help can see what has already been done so they don't need to waste time repeating things already discussed.
...
Also posted at: while loop just stops looping