• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Static block is not executing in a program

 
Deepak Kumar Jha
Greenhorn
Posts: 18
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Added code tags - see UseCodeTags for details]

As i know before executing main method static block should be executed but in this case this block is not executing. ??
 
Matthew Brown
Bartender
Posts: 4567
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As it happens, I've seen a similar question here recently. Have a look at http://www.coderanch.com/t/604889/java/java/Static-initialization-happening - it's the same explanation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic