I see this notation, a new statement with the class name, and then the code enclosed in brackets, sometimes in Android examples. Can someone explain this? In the example below, the PanChangeListener is a class (or possibly an interface) and the βnewβ creates an instance, but what role does the code in square brackets play with respect to the PanChangeListener?
fType pcListener = new PanChangeListener() { @Override public void onPan(GeoPoint old, GeoPoint current) {
Even a name for this syntax would be useful since I could use it by Google.
source share