Pregunta de entrevista de GM Financial

What is a singleton?

Respuesta de la entrevista

Anónimo

31 ene 2020

The singleton design pattern restricts the instantiation of a class to a single instance. This is done in order to provide coordinated access to a certain resource, throughout an entire software system. Through this design pattern, the singleton class ensures that it’s only instantiated once, and can provide easy access to the single instance.

1