Originally posted by Higgledy Smith:
Henry: Why is new Bar have parens? (new Bar) what is the .go doing there? It just seems mangled. I am worried I won't recognize something like this on the exam.
It is just needless acrobatics. Instead of assigning the new anonymous class to a variable, the example uses it immediately. In this case, calling the go() method on it.
Don't worry, after you encounter it a few times, you'll learn to recognize it.
As a developer,
you should probably never do this. It is not very efficient to create a class, just to call one method, and throw it away.
Henry