Which Gang of Four design pattern is shown below? public class A { private A instance; private A() { } public static A Instance { get { if ( A == null ) A = new A(); return instance; } } }

Options
- Factory
- Abstract Factory
- Singleton
- Builder


CORRECT ANSWER : Singleton

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement