1.

____________ is a useful design pattern that ensures a class has only one instance.(a) Modular code(b) Lossless paradigm(c) Granular methods(d) SingletonThis question was posed to me in homework.Origin of the question is JMock in chapter Testing with Mock Objects of JUnit

Answer»

Right choice is (d) SINGLETON

Easy explanation: Most OFTEN, the implementation of a singleton defines a private CONSTRUCTOR and a STATIC variable.



Discussion

No Comment Found

Related InterviewSolutions