Pola Singleton mesthikake sawijining kelas mung duwe siji instance lan nyedhiyakake titik akses global kanggo melu. Digunakake nalika persis siji obyek kudu ngatur samubarang (konfigurasi, connection pool, logger), sanajan uga dadi kontroversi.
Apa sing ditindakake Singleton
SINGLETON → guarantee a class has only ONE instance, with global access to it:
→ the class controls its own instantiation (private constructor)
→ returns the SAME instance every time it's requested
→ for: things there should only be ONE of, accessed from many places
