Let's say I have an array with many Strings Called "birdBlue"
, "birdRed"
and some other animals like "pig1"
, "pig2"
).
Now I run a for loop that goes through the array and should return all birds. What comparison would make sense here?
Animals == "bird*"
was my first idea but doesn't work. Is there a way to use the operator * (or is there something similar to use?
Instead
Animals == "bird*"
Animals = "bird*"
should work.