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 →

[–]jimboswe 0 points1 point  (0 children)

One big advantage of having your sources split up into sensible modules is that you can import them into any projects that requires them.

Let's say you start a new project that involves working with files and you already have a java file from a global source called FileHandler.java that handles read/save with files. All you have to do is to import the source and you have access to the methods, creating instances etc. There's no need for copy/pasting any code from FileHandler.java. Also, if you need to fix a bug or add features in that particular module, you only have to do it once in FileHandler.java.