I was reading a textbook and I was wondering how come the argument we pass to the function is neither a primitive or an user-defined instance of a class.
SwingU
This called anonymous class, where you define a class for a single use and do not provide it a name.
To understand them better, refer to this tutorial: http://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html