Is it forbidden to use static methods in factory pattern?
问题 I got told that using static methods when implementing the factory-method-pattern is wrong and should be avoided. Because I wasn't really familiar with the pattern I accepted that answer. After reading articles and getting deeper into it, I couldn't find any source which supports this statement. Can someone help me out with this situation. Should I avoid the static-keyword in factory-methods and if so, when are they useful? 回答1: The first thing to be 100% clear about is that there is no