What is Double Brace initialization syntax ({{ ... }}
) in Java?
I think it's important to stress that there is no such thing as "Double Brace initialization" in Java. Oracle web-site doesn't have this term. In this example there are two features used together: anonymous class and initializer block. Seems like the old initializer block has been forgotten by developers and cause some confusion in this topic. Citation from Oracle docs:
Initializer blocks for instance variables look just like static initializer blocks, but without the static keyword:
{
// whatever code is needed for initialization goes here
}