computer






 

Question by  euterpe (30)

What is a Java static block?

 
+7

Answer by  Christian9247 (5042)

Static blocks are a set of code set to do various parts of initialization of a program or code function. They are blocks defined by a class of using the keyword but used outside of the code blocks. They optimize and synchronize most Java script. They are most useful for writing holder class.

 
+6

Answer by  DrHarris (508)

A static block is code that is executed when the class is first loaded. Think of it like a constructor for the class itself, not an instance of the class.

 
+4

Answer by  mary3334 (85)

static block is a block that are initialized when the java virtual machine is loaded . It is initialized in the keyword 'static'

 
You have 50 words left!