← Zomato questions
Low-Level DesignReported in a candidate post, Jul 2025

Singleton class in Java with implementation

Filed under Zomato

Explain what a singleton class is in Java and write the code for one. Cover why it is used, how to make it thread-safe, and its drawbacks.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Zomato questions

Collected from public candidate posts and coding forums. Updated Nov 2026.