2 ms·
No, a singleton still has a constructor though - it's just not public. It's called when the factory method creates a new instance. the factory static method is
by stephenr 15y ago
No, a singleton still has a constructor though - it's just not public. It's called when the factory method creates a new instance. the factory static method is NOT the constructor.
- gabordemooij 15y agoYes this is correct. The constructor in a singleton pattern is private. I meant the way to obtain an instance is the same. Sorry for my mistake.