Many years ago sun/oracle laid out code conventions for java (see Code conventions
) which state that instance variables be at the top (above the constructor) in the order of public, protected, private (see Class Declarations
). You may choose to follow or not follow the rules, but even for things like posting code snippets on forums such as this, code that don't follow the rules may not help your chance at receiving replies. Many a time I have had to refactor code that doesn't follow the convention, and it is a royal pain in the you know what.