View RSS Feed

Recent Blogs Posts

  1. Static Initialization Blocks

    by , 04-26-2012 at 05: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 ...