J
Joona I Palaste
(e-mail address removed) scribbled the following:
The static at this point means that the following code is a static
initialiser block. It's run once when the class is first loaded into
the JVM, and then never run again.
A final class means a class that cannot be subclassed.
Class.forName is a method for generating Class objects (look it up
in the Java API docs) from class names.
I have seen code like the following and was wondering
what it means. I cannot understand the meaning of the
keyword static at this point. Further on, what does it mean
if a class is final? I know the keyword final just from the
context of variable declarations. And what is this Class.forname
thing (I dont understand the explanation from the API)?
The static at this point means that the following code is a static
initialiser block. It's run once when the class is first loaded into
the JVM, and then never run again.
A final class means a class that cannot be subclassed.
Class.forName is a method for generating Class objects (look it up
in the Java API docs) from class names.
public final class Blah extends HttpServlet {