I wanna know where I went wrong with my logic. I want to entire the for loop when found == true and do the condition else if not found i wanna execute that condition. Any help would be greatly appreciated..
boolean found = false;
for (String keyword : keywords) {
found = true;
if (input.contains(keyword)) {
parseFile(keyword);
break;
}
if (!found) {
Writer();
break;
}
}
found = true;for each keyword. This will stay true for all the cases.