Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

static initializer

Static blocks or static initializers are used to initalize static fields in java 
we declare static blocks when we
want to intialize static fields in our class. 
Static blocks gets executed exactly once when the class is loaded
Static blocks are executed even before the constructors are executed.
 
PREVIOUS NEXT
Tagged: #static #initializer
ADD COMMENT
Topic
Name
7+7 =