Possible Duplicate:
Static Block in Java
I came across the following use of static
and did not figure out what it does.
I am aware of using for example static String hello = "World";
but I do not understand the following.
static {
loadFromProperties(new Properties());
}
It's called a static initializer. It's a block of code that runs when the class is initialized.
Related question (probably a dup actually):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With