View RSS Feed

Java Object

Object-oriented programming in Java.

  1. Static Initialization Blocks

    by , 04-26-2012 at 04:53 PM
    A static initialization block is considered to be a normal code block which is enclosed in braces, { }. It is however preceded, by the static keyword. For example:
    Java Code:
    static {
        // whatever code is needed for initialization goes here
    }
    A class may consist of any static initialization blocks number.They might be present in the class body, anywhere. It is guaranteed by the runtime system to call static initialization blocks in similar order in which they ...
    Categories
    Tutorial