Specifications
Sun Services
Java™ Programming Language
Module 7, slide 10 of 44
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Static Initializers
• A class can contain code in a static block that does not
exist within a method body.
• Static block code executes once only, when the class is
loaded.
• Usually, a static block is used to initialize static (class)
attributes.










