Top News

Is it possible to execute a program without defining a main() method?

 

No, with Java 7 onwards, you need a main() method to execute a
program. 

In earlier versions of Java, there was a workaround
available to use static blocks for execution. But now this gap has
been closed

Post a Comment

Previous Post Next Post