I\'ve got a nested loop construct like this:
for (Type type : types) { for (Type t : types2) { if (some condition) { // Do somethin
For some cases, We can use while loop effectively here.
while
Random rand = new Random(); // Just an example for (int k = 0; k < 10; ++k) { int count = 0; while (!(rand.nextInt(200) == 100)) { count++; } results[k] = count; }