I'm a complete beginner with
Java. Here's a question I have about the Oracle Java tutorial:
http://download.oracle.com/javase/tutorial/collections/interfaces/collection.html
The following method shows you how to use an Iterator to filter an arbitrary Collection, that is, traverse the collection removing specific elements.
I don't see how !cond creates a boolean expression for the if statement. If the collection holds references of type Boolean I understand that
would remove, using the above snippet, any elements that are False.
Or if the collection holds Strings and you want to remove "cat" you could write
But what is the meaning of 'cond' in the tutorial? Is it an undefined condition? If so, the example in the tutorial seems to me unclear or a bug.
Thanks.