Java declarations (ordering)

Posted by incrediman on Stack Overflow See other posts from Stack Overflow or by incrediman
Published on 2010-03-30T17:10:29Z Indexed on 2010/03/30 17:13 UTC
Read the original article Hit count: 357

Filed under:
|
|
|

In Java, what's generally the most accepted way to organize a class in terms of the order in which declared data members and methods should be listed in the class file, keeping in mind the following and anything else you can think of for each one:

  • its visibility
  • whether it's a constructor, method, or member
  • if it's a method, does it overload, or override other method(s)?

© Stack Overflow or respective owner

Related posts about java

Related posts about definition