I tried to understand the behavior of initialization order when static fields are initialized with a reference to the same enclosing class object.
public
static final a=5 It is final so it initialize first, before other static members or methods.
static final a=5
final
In first scenario main() method get executed first and it initializea to its default value 0.
main()
a
0