I have an if
statement:
if (inventory.contains("bread"))
But now I want to check
- if
inventory
contains "bread" - but does not contain "water".
How can I do this?
question from:https://stackoverflow.com/questions/15730134/java-opposite-of-contains-does-not-contain