As in the related question you are referencing to is discussed, an anonymous class cannot be static technically, but it can be so called effectively static if it is declared in a static context, that is it has no reference to the outer instance.
In your case, however, there is definitely no difference between two approaches, the initialization of static fields is a static context as well.