Tradeweb interview question

Thread safe Singleton implementation.

Interview Answer

Anonymous

Sep 19, 2018

principles: private static obj private constructor public static synchronized getInstance function Best double-checked locking: check null -> synchronized -> check null -> new obj