Pardon the French names for variables, it do be like that. But I was wondering if I could use a third removeif function to remove grande and petites from original and then show original with the removed values. I know I could use a for loop and I might be getting ahead of myself as beginner but I am trying out new stuff.
CodePudding user response:
First, never post code as an image. Second, yes of course you can have such a removeIf
. Basically, you want to remove the value if the value is in grande
or in petites
. Like,
original.removeIf(v -> grande.contains(v) || petites.contains(v));