Domanda di colloquio di GM Financial

What is a singleton?

Risposta di colloquio

Anonimo

31 gen 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