I
I
Ivan Shubin2019-03-26 19:56:56
Java
Ivan Shubin, 2019-03-26 19:56:56

What does static mean in this case?

What does static mean in this case? (java)

class{
    static {
        //код
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
greenhack, 2019-03-26
@minecraft8997

This is called a static initialization block. In this case, this means that the code inside the block will be executed at the moment the class is initialized, before the constructor is called (if the class is instantiated), or the first time a static class method is called.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question