I was looking over some code the other day and I came across:

static {
    ...
}

Coming from C++, I had no idea why that was there. Its not an error because the code compiled fine. What is this “static” block of code?

7 Answers
7

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *