+ 1
Can we write a java program without main() and by writing static block
YES up to jdk 1.6 version one can write a java program without main() and any by writing only static block. from jdk 1.7 version onwards the above program will be complie but it will not execute we get compile time error saying that main() be define.
3 ответов
+ 13
Ok, not a question, but information ^^
+ 11
...and that is our contributor @Deepak Ghodase who has given the latest Java update For Sololearn Channel.
Thank you for watching.