Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Converting an instance field into a parameter to a static method is not an equivalent proposition. Parameters passed into static methods are not persisted on a per-instance basis. Commented Apr 26, 2018 at 5:34
  • @RobertHarvey if the field needs modifying then as I said, static methods aren’t suitable. If that’s not what you mean, then I’m unclear what “... are not persisted on a per-instance” basis refers to. Commented Apr 26, 2018 at 5:59
  • @RobertHarvey, I updated my answer as I realised it was misleading. I took as read that the OP was talking about private methods, but this may not be the case. So I updated my answer to make it clear that my advice only applies to such methods; not public ones. Commented Apr 26, 2018 at 8:27