The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

David M. Karr (83) [Avatar] Offline
#1
In section 3.3.1. Overview of overridable operators, in the table of overriddable operators, it lists the unary minus and plus operators, and in the list of types that the operator "works with", along with the obvious "Number", it lists "ArrayList". What would unary minus or plus do with an ArrayList?
David M. Karr (83) [Avatar] Offline
#2
Never mind. I figured this out. Unary plus doesn't really do anything, but unary minus will return a new ArrayList with all of the entries negated.