3 ms·
It's addressed near the end: > Eliminating the main method altogether may seem like the natural next step, but it would work against the goal of gracefully evo
by djur 4y ago
It's addressed near the end:
> Eliminating the main method altogether may seem like the natural next step, but it would work against the goal of gracefully evolving a first Java program to a larger one and would impose some non-obvious restrictions (see below):
The "see below" boils down to there being a number of differences between how class-level and method-level code units (fields vs. variables) work, and blurring the line there isn't worth the minor additional effort of writing a main() method.