So, imagine I've got a
List<String> colours = {"blue", "red, "green", "yellow}
And another one :
List<String> desiredColours = {"black", "red", "yellow", "white" }
How can I do if I want to know which colour from the desiredColours
is in `colours``
I could do it with a double for
, but I would like to know if there is any already existing Java Function which already does it. Or at least someting like
for ( String colour : desiredColours ){
if (colourisIn(colour, colours)){
res.add(colour)
}
}