guys i am a beginner in java ... i want to make a function to loop through a hashmap for example it contains
0[3],3[4,5],6[2]
and to break when the method isSiteInherited is true else return false... here is what i made
private boolean isInherited() {
boolean isInherited = false;
for (Entry<Integer, Set<Integer>> entry : siteIndeciesMap.entrySet()) {
for (Integer index : entry.getValue()) {
if(isSiteInherited(index)){
break;
}
}
}
return false;
}
if not sites are found inherited return false and if it enters the break it should break from all the method ... so what is wrong with this method