In OO languages, what is the advantage of using factory methods and private constructors to create objects?
What's the advantage over using a public constructor and no factory method?
When you don't want other users to create an instance of your class or if all methods would be declared as static then private constructor should be used. With factory method, you can create an instance using the "new" keyword
~ swim ~ Sure but that doesn't solve the problem our hypothetical `Bar` class is having.
But if `Bar` doesn't have a proper constructor applicable for the ctor initializer then it's even less applicable while declaring a class. :/