Should you use constructor or factory method?
Views: 1720
Constructor We have been using constructors in object-oriented programming languages such as Java, C++, etc. A constructor is a special type of static method which can be invoked using thenew keyword and used to initialize the fields of a newly created object. Problem with constructors The name of the...