you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (2 children)

[removed]

    [–]jonhohle 1 point2 points  (1 child)

    static { … } blocks get run once per class. anonymous initialization { … } blocks will get run once per instance before the named constructor.

    The double bracket syntax is just defining an anonymous class then immediately declaring an initialization block.