Static keyword in Java has unusual properties. A variable flagged as static acts like a global variable, a class maintains a single copy of the static variables in the memory which is shared by all the class instances or objects of that class. A method tagged as static can be called without the creation of class object at first. Being a static method also puts some restrictions on the method, for example, it can only access static variables, can call only static methods and can not refer to "this" or "super" keyword in any way. In this article, I will try to clear some concepts regarding Static Block.
Showing posts with label Static Block. Show all posts
Showing posts with label Static Block. Show all posts
Subscribe to:
Posts (Atom)