What is the standard for the composition of methods in a class?
I know to put the constructor first (increasing parameters) and the main method last, apart form that since my programs were never that big I've positioned my methods more or less arbitrarily. I've been tought many standards and conventions from my books but nothing on this.
should I make it alphabetical with the excepton of getters/setters that are grouped before the main? because I was heading that way for some reason
Re: What is the standard for the composition of methods in a class?
Quote:
Originally Posted by
EscSequenceAlpha
I know to put the constructor first (increasing parameters) and the main method last, apart form that since my programs were never that big I've positioned my methods more or less arbitrarily. I've been tought many standards and conventions from my books but nothing on this.
should I make it alphabetical with the excepton of getters/setters that are grouped before the main? because I was heading that way for some reason
This is not a dumb question, not at all, and I'm not sure if there is any one universally agreed upon standard, but you can't go wrong reviewing what Oracle has to say on this at their standards document site: