BrianMc1958
asked on
Please advise on physical order of Java items
Dear Experts,
Could you folks either tell me directly, or point me to links on the best practices for the physical order of items within a class?
At the moment, I'm trying to place abstract method declarations. But I'd like to know the whole ball of wax. I've read that all public methods should come first, for instance. But should they come before private class variables? Should your constructor/s always come first? Etc., etc....
Thanks!
BrianMc1958
Could you folks either tell me directly, or point me to links on the best practices for the physical order of items within a class?
At the moment, I'm trying to place abstract method declarations. But I'd like to know the whole ball of wax. I've read that all public methods should come first, for instance. But should they come before private class variables? Should your constructor/s always come first? Etc., etc....
Thanks!
BrianMc1958
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nice link!
;-)
ellandrd
ellandrd
Thanks for the grade
ellandrd
ellandrd
:-)
When i was learning Java I was told to place all my imports and variable declarations at the top and in groups. then followed my constructors, public first, then private and last i had my methods at the bottom half of my program.