http://www.java2s.com/Code/Java/Event/PropertyChangeListenerSample.htm
(Java)
In the above example, I noticed the line
PropertyChangeListener propertyChangeListener = new PropertyChangeListener() {
by itself, this wouldn't make sense, as PropertyChangeListener (java.beans.PropertyChangeListener) is an interface, and is therefore not instantiable.
However, right after, it seems a class that implements PropertyChangeListener is being written, without ever making a class keyword statement. I've never encountered this syntax before.
What is this syntax called, and how do I use it properly? Also, can anyone give me more examples of it? I'm not sure exactly what to google, so any leads would be helpful.