Q:- can we execute a class without main?
Ans:- The ans is yes as well as no
yes because before release of final version of jdk 7 we can execute a class having only static block in it
and no because after jdk7 no class can be executed without a main function
Ans:- The ans is yes as well as no
yes because before release of final version of jdk 7 we can execute a class having only static block in it
and no because after jdk7 no class can be executed without a main function
No comments:
Post a Comment