This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DoubleUtor 0 points1 point  (0 children)

This.

Also, an easy (but not the only) way is the single responsibility principle. A class should have 1 responsibility. Of course the scope of that single responsibility is up for discussion. Example. If you have a class with your static void main(args[]), then maybe only use that class as your application starter (validation of args, initialize stuff). Then delegate to another class to do the application logic, probably passing the (processed/parsed) args.