Welcome to the Treehouse Community
Looking to learn something new?
Pratham Patel4,976 Points
What is the point of learning object oriented programming
In the java objects course we model apes dispenser We take two files Why couldn't we just do it on one file instead
With smaller java projects you could very well just put all of your code into one file. The reason behind using multiple files, besides just good habit/practice, is so that if you were creating a larger project with a lot of code and extra functionality, your one file with the "main method" doesn't get cluttered up and your code is easier to understand.
If this is confusing I can try to explain it in a different way.