0
Can we run java program without main method?
Please share your answer
4 Respuestas
+ 3
Satyam Kumar Sharma You can run using static block.
https://www.tutorialspoint.com/can-we-execute-a-java-program-without-a-main-method#:~:text=Yes%2C%20we%20can%20execute%20a,as%20a%20static%20initialization%20block.
+ 3
Satyam Kumar Sharma It works till Java 1.6. New version don't allow.
0
Bro it is not run
0
Ok