Home Discussion Discuss: Class

  • JjGszEbRQNMhBciUDAsha August 25, 2012 at 2:10 PM

    To be precise, JVM extucees the Static Blocks associated with a Java Class when JVM loads that Class (as opposed to creating an instance of that class or accesssing static member of that class). There can be other reasons also for loading of a class.Static Blocks are an effective way to do one-time initialization for example, you can use them to create state of a Singleton class or any other such stuff.

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
Related Articles