Card 6 / 72: You want all the clients using class A to use the same instance of class A, what should you do to achieve this goal?
A)
mark class A final
B)
mark class A abstract
C)
apply the Singleton pattern to class A
D)
apply the Memento pattern to class A
Answer:
C) apply the Singleton pattern to class A
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|