I have been trying to no avail to find a solution to this thing i am trying to do. What i am trying to do is to check if the String superConcept is equal to the first element of a line within the kb, and if so, it is checked if any of the remaining Arraylists in the list contain the same first element.
public static List<ArrayList<String>> kb = new ArrayList<>();
for(ArrayList<String> line : kb){
if(superConcept.equals(line.get(0))){
//to check if there are any other lines within the kb that contain the same first element (line.get(0))
}
}
superConceptas their first element?