← Barclays questions
Low-Level DesignReported in a candidate post, Jan 2023

Singleton: write it, break it, prevent breaking

Filed under Barclays

Write the Singleton design pattern in Java so a class has exactly one instance per JVM with a global access point. Then explain the ways the guarantee can be broken (reflection, serialization…

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 Barclays questions

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