I am writing a program that looks for a solution of a diophantine equation. The program is cycling 

```
for (int d = 0; d <= max; d++) {
    for (int c = 0; c < d; c++) {
        boolean possibleSolution = true;  
        possibleSolution =test1(c,d);
        if(possibleSolution) {possibleSolution =test2(c,d);}
        ...
        if(possibleSolution) {possibleSolution =test30(c,d);}
        if(possibleSolution) solutionFound(c,d);
    }
}

```

My `testN` methods are reasonably optimized. Most solutions are removed by a simple `test1`, but program has to run 30 pointless `if(possibleSolution)` checks. Is there a way to directly go to a new cycle of the `testN` yields `false`. Can a `try ... catch` block or some similar structure be adopted for this purposes?