Best Practices for Private and Protected Methods

When you declare methods other than the public method (for example, a utility method), consider these best practices:

  • Declare nonpublic methods as protected or private; all methods must be static.

  • Keep scope as private as possible.