Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

A Question of My Own

807600Sep 30 2007 — edited Oct 2 2007
So, after a two-day posting spree here, I finally have a question of my own. :D
While not so technical, I suppose this question is more to incite discussion and see what people's opinions are.

So, the question is this:
At what point, when writing a single-file program that's around 800-1000 lines, do you decide to make something a method? For example, I have a rather large file (that I'm not pasting here, so breathe that sigh of relief) that makes use of three different methods to make things clearer. However, I could've easily made it six or seven methods, and had pure method calls in my main method; on the other hand, I could've also stuck everything in my main method, making it very hard to read.

So, just wondering, is there some sort of convention as to when something is "method material," and when something isn't?

Just some food for thought.
Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 30 2007
Added on Sep 30 2007
16 comments
110 views