0
Is it possible to run program without main method?
3 odpowiedzi
+ 4
No.
Before Java 7 you could use the static block to execute code without the main method. Since it runs before main is called, when the class is loaded.
But this is no longer allowed.
0
thanks