Home Search Jobs Govt JobsNew Resume Makernew Career Guidance Ask n Answer Student Ambassadors


  Ask n Answer
  Ask a Question
0 out of 300 characters

can a java program works without a main method?.....
By K.APARNA (Beginner)  5 years ago   22 views
 Your Answer
0 out of 1250 character
Share |
Report Abuse
SUCITRA.M (Mentor) 5 years ago
if there is a static block in a java program,the class loader loads all static block before java gives call to main() method!. however after the execution of the static block an error message appears as NO MAIN METHOD FOUND..
Know a better answer? Click here to post.
It was possible to do this till Java SE 6 but from Java SE 7 it doesn't work anymore.
Know a better answer? Click here to post.

Ask & Answer
Panel of Experts

All rights reserved © 2021 Info Edge (India) Ltd.