how to initialize a private static member of a class in java.
trying the following:
public class A { private static B b = null; public A() {
Your code should work. Are you sure you are posting your exact code?
You could also initialize it more directly :
public class A { private static B b = new B(); A() { } void f1() { b.func(); } }