Thursday, December 24, 2009

Initializer block

The various initializer blocks are

Static Variables Initializer:
static blocks (a class can have any number of static blocks and they are executed in the particular order)
private static method(call this private static method for a private static variable)

Member variable Initializer:
Constructor
Initializer blocks (they are similar to static blocks without the word static)
private final method (call this private final method for a private variable)

Reference: http://java.sun.com/docs/books/tutorial/java/javaOO/initial.html

No comments: