Shopee interview question

Implement thread-safe Java singleton object?