Why is this Java code in curly braces ({}) outside of a method?
Borrowed from here – Normally, you would put code to initialize an instance variable in a constructor. There are two alternatives to using a constructor to initialize instance variables: initializer blocks and final methods. Initializer blocks for instance variables look just like static initializer blocks, but without the static keyword: { // whatever code is … Read more