Hyderabad, , India
Android, C Plus Plus, HTML
4 Comments | 38 Views | 02 Apr 13  | Srinivasarao Mahanti
How to execute a java program without having main() method?
One of the Interviewer asked me How to execute a java program without having main method I Said him it39s possible with using writing a static block of code in that class so it will compile fine and executes that block of code and gives the output. here it is the example.. class StaticDemo static System.out.printlnquotthis is static blockquot System.exit0

    • Social Share
      for this Blog

Porfolio And Blogs
Srinivasarao Mahanti follows various companies, these companies and employers can view Srinivasarao's resume.
Upload your resume to get best job opportunities.

Register free!