I don’t understand the difference between A and B.
A
private static final CookieStore sCookieStore;
static {
sCookieStore = new CookieStore();
}
B
private static final CookieStore sCookieStore = new CookieStore();
Is there somebody who can clarify my understanding?
They’re effectively equivalent in your example. B is shorter, and preferred for simple creations, but A allows more complicated intialization.
E.g.