Computer Science, asked by Danisgreat, 1 year ago

what is static initialization in java

Answers

Answered by yashThakur11
2
Hii

The static initializer is a static {} block of code inside java class, and run only one time before the constructor or main method is called. OK! Tell me more... is a block of code static { ... } inside any java class. and executed by virtual machine when class is called.

may be this answer was helpful for u

Danisgreat: why are you copying from google?
yashThakur11: as i don't know about it but i want to help you thats why i had copy it from Google
Answered by Anonymous
3
Static initialization means initialization at the time of declaring a variable. It means direct assignment of a variable with defined constant.

For instance :
a=2;
b=1;

# A student of class 10.

Anonymous: thank u for marking me as brainliest
Similar questions