You should add a flag to the loop letting you know a score was found, rather than the if/else, at least I'm guessing this is the behavior you want


boolean found = false;
for (int i = 0; i <...