3 ms·
The first { opens the body of the anonymous inner class. The second { starts an instance initialization block, which runs on each object when it is constructed
by Robin_Message 17y ago
The first { opens the body of the anonymous inner class.
The second { starts an instance initialization block, which runs on each object when it is constructed - not sure if it's before or after the constructor - gonna guess before!
It's useful in this case as anonymous inner classes can't define constructors.