A)
->to initialize static variables of the class stack block is used.
->as soon as the object is created whatever task we want to perform that code will implement in a constructor.
->similarly as soon as the class is loaded, whatever task we want to perform that code we place in the static initialize
->one of the usage of static block in the JDBC application loading JDBC driver manager and registering with everything is done in stack block.
Comments
Post a Comment