...
This compliant solution does not spawn a background thread during class initialization.
Code Block | ||
---|---|---|
| ||
public class Lazy {
private static boolean initialized = false;
static {
// other initialization
}
public static void main(String[] args) {
System.out.println(initialized);
}
}
|
...