Is there a convention in Java on where to declare fields - before or after methods?
Class layout: see here http://java.sun.com/docs/codeconv/html/CodeConventions.doc2.html#1852
The following table describes the parts of a class or interface declaration, in the order that they should appear
- Class/interface documentation comment (/*.../)
- class or interface statement
- Class/interface implementation comment (/.../), if necessary
- Class (static) variables
- Instance variables
- Constructors
- Methods
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With