I modeled the following off of something I inherited and am upgrading. What you are seeing is really just about as simply as what I'm working on. Why make makeAnObj()
static? What does being static provide or offer that not being static doesn't?
public interface IsomethingElse { int mbr(); }
public class obj : IsomethingElse {
public static obj makeAnObj() { return new obj(); }
public int mbr() { return 1; }
}
Edit: I'm repeating my reply from the thread below for additional background. his question is not an exact duplicate of the one being referred to. I'm not asking what a static f() is. My point is, look at what makeAnObj() does. I don't need a method to do create a obj (unless the method is also going to do something more, in this case the method isn't adding any addition value in the code.) The only value of this static is the programmer can create an instance by calling obj.makeAnObj() instead of new obj; far less readable IMO.