Try debugging the method by adding some printlns to see what values the variables in the method have.
The printout should show you what is happening.
The code has some hard coded magic numbers...
Type: Posts; User: Norm
Try debugging the method by adding some printlns to see what values the variables in the method have.
The printout should show you what is happening.
The code has some hard coded magic numbers...
How does randomInt() generate the number it returns?
You need to add lots more println statements to see what the code is doing. Print out the values of variables as they are used and changed.