Like @1800 INFORMATION suggestion, use the condition that breaks the inner loop as a condition on the outer loop:
boolean hasAccess = false;
for (int i = 0; i < x && hasAccess == false; i++){
for (int j = 0; j < y; j++){
if (condition == true){
hasAccess = true;
break;
}
}
}