Walmart Interview Question

They asked me to implement a thread-safe singleton pattern in Java and explain how it ensures lazy initialization and avoids synchronization issues in a multithreaded environment. Let me know if you'd like a version tailored for java, or another topic.