These are chat archives for atomix/atomix
staticblock. Static class variables and code are evaluated when the class is loaded by the JVM. So, for instance, if you do
Class.forName(“foo.bar.Baz”)then any static code in the
Bazclass will be evaluated. The
staticblock can be used to operate on static fields when the class is loaded.
protected, etc). Package private means any code in the same package can access it. The static block is obviously in the same package. They set the fields directly since it’s almost pointless to add setters for that, and the object is immutable outside the package