Static
can be used in four ways:static
variables are shared by the entire class, not a specific instance (unlike normal member variables)static
methods are also shared by the entire classstatic
classes are inner classes that aren’t tied to their enclosing classesstatic
can be used around a block of code in a class to specify code that runs when the virtual machine is first started up, before instances of the class are created.
No comments:
Post a Comment