I suppose method parameter accepts object wich extends JsonHttpResponseHandler object. And here is passing such new object generated pragrammatically as anonymous class. So it is legal in java.
See https://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html#syntax-of-anonymous-classes
1.4m articles
1.4m replys
5 comments
57.0k users