Question: In the Singleton pattern, what will happen if the getInstance ( ) method is not synchronized? The getInstance ( ) method could return a null
In the Singleton pattern, what will happen if the getInstance method is not synchronized?
The getInstance method could return a null value
Only one instance of the singleton class will be created
Two instances of the singleton class could be created
All choices are true
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
