This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes static initialiser blocks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "static initialiser blocks" Watch "static initialiser blocks" New topic
Author

static initialiser blocks

Soni Prasad
Ranch Hand

Joined: Mar 09, 2005
Posts: 97
Am I right that the variables defined in static initializer blocks are local to it and can not be used outside the block? If it is so then What is the need of these blocks?
Can any body tell me about some detailed online document on static initializers.

soni.


SCJP 1.4, SCBCD 1.3
S.L.Narayanan
Ranch Hand

Joined: Apr 01, 2005
Posts: 431
Hi Soni

The following is a good article on static initializers.

Static Initializer


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, NEXT--->IBM XML
 
 
subject: static initialiser blocks
 
Similar Threads
Is this correct?
Interfaces
Static initialisation
this Refrence Problem
static fields in EJB