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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment