Separate public and private members

It's a common practice to separate the members of a class according to their scope (private, package-private, protected, public).

It's a matter of some debate, however, which should come first.

Private-first style :

Public-first style (or, more precisely, largest-scope-first) :
See Also :
Construct classes from the outside in
Avoid basic style errors
Would you use this technique?
Yes   No   Undecided   
© 2013 Hirondelle Systems | Source Code | Contact | License | RSS
Individual code snippets can be used under this BSD license - Last updated on August 30, 2012.
Over 2,400,000 unique IPs last year - Built with WEB4J.
- In Memoriam : Bill Dirani -