+ 1

Can we Execute Java program without main() Method?

7th Sep 2018, 6:13 PM
Slim Jxmmi
5 Réponses
+ 4
No,we require main() method for execution of program
7th Sep 2018, 6:21 PM
Yesh Jadav
Yesh Jadav - avatar
+ 3
what about static block?
8th Sep 2018, 7:43 PM
Linda
Linda - avatar
+ 1
no
9th Sep 2018, 9:20 AM
Chhagandas Pawar
Chhagandas Pawar - avatar
0
You can compile your Java program without main() method and check whether systax is correct or not. But to check output of your program you have to create a main() method.
17th Sep 2018, 9:37 AM
Vijay Meena