Question - object{} is compiled to a class with a ...
# announcements
m
Question - object{} is compiled to a class with a public static field which is assigned by the private c'tor. That c'tor is invoked by the <clinit>. This turns out to not play very well with serialisation frameworks like Kryo that feel entitled to invoke private constructors - if you accidentally serialise a singleton and deserialise it again, the ctor is re-run and you end up with two instances of the singleton