Q:

Is Java ClassLoading SingleThreaded?

While reading on Multi threading, I came to know that Singleton need to have double locking check and singleton reference declared as volatile so that

Synchronization overhead is avoided
Multiple Thread does not created multiple instances of Singleton class under consideration by accident
Please refer this blog.
http://javarevisited.blogspot.sg/2014/05/double-checked-locking-on-singleton-in-java.html

The questions in my mind are, 
If the Class loading is single threaded why we care for multi threading issue?
A static initializer block happens to execute exactly once in application life cycle, then why not create a singletone using static initializer ?

A:

Class loading is not necessarily single threaded. Since Java 7, ClassLoaders can mark themselves as parallel capable.
Instantiating a singleton in a static initializer is fine. The main downside is that these initializations are eager, as opposed to lazy. This can be mitigated by the using the initialization on demand idiom. However take note, it is possible to run a static intializer twice by creating a custom ClassLoader.

