+ 1

Can we compile a program without main method?

will it give error or not?

8th Jan 2018, 7:53 PM
Yogesh Sharma
Yogesh Sharma - avatar
2 Respostas
+ 5
Yes but can't run with out main.
8th Jan 2018, 7:59 PM
Yogesh Sharma
Yogesh Sharma - avatar
+ 4
As of Java 7, no you cannot.
8th Jan 2018, 9:55 PM
Rrestoring faith
Rrestoring faith - avatar