What is a Static Block:
It is a block of code that runs once when the class is loaded into memory, without creating object.
static{
//code}
What is a Non Static Block:
It is a block that runs every time when an object is created.
{
//code
}
What is a Static Block:
It is a block of code that runs once when the class is loaded into memory, without creating object.
static{
//code}
What is a Non Static Block:
It is a block that runs every time when an object is created.
{
//code
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)