Computer Science, asked by anuj, 1 year ago

What is static block?

Answers

Answered by Anonymous
1
Static block is used for initializing the staticvariables.This block gets executed when the class is loaded in the memory. A class can have multipleStatic blocks, which will execute in the same sequence in which they have been written into the program.
Answered by anshika184
1
Static block used initilization the static variable. Block get executed when class loaded in memory. Static block executed in same sequence.
Similar questions