Card 50 / 72: how to implement the Singleton design pattern? specify all the needed steps that apply.
A)
add final modifier to the Class declaration
B)
add final modifier to the constructor declaration
C)
add private or protected modifier to the constructor declaration
D)
introduce a final static constructor of the Singleton class
E)
introduce a static getter method for the Singleton instance
F)
The class name must be Singleton
Answer:
A) add final modifier to the Class declaration
C) add private or protected modifier to the constructor declaration
E) introduce a static getter method for the Singleton instance
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|
Author:
JavaChamp TeamSenior Java Developer
QuizOver.com
Germany
Access: |