how to loop a certain amount of numbers x amount of times java code example
Example: java repeat loop cycle for
for(int i = 0; i < 10; i++) {
//your code
if(random.nextInt(5) == 0) { i--; } //1 in 5 chance to repeat loop cycle
}
for(int i = 0; i < 10; i++) {
//your code
if(random.nextInt(5) == 0) { i--; } //1 in 5 chance to repeat loop cycle
}