I can see that someone is discussing static and final. I also want to sum up, hey.
Static Method
Generally, a method is defined as static in a class, that is, this method can be called without the objects of this class.
To call a static method is "class name. Method Name". The use of static methods is simple.
Generally, static methods are usually used for applications.ProgramOther classes in Java provide some practical tools for this purpose.
Static variable
Static variables are similar to static variables. All such instances share this static variable, that is, when the class is loaded,Allocate only one bucketAll such objects can manipulate the block storage space.
Final member
When you define a variable in a class and add the final keyword before it, this variable cannot be changed once initialized, the unchangeable meaning here is that its value is immutable for the basic type, and its reference for the object variable cannot be changed. It can be initialized in two places. One is its definition, that is, it is assigned a value directly when the final variable is defined, and the other is in the constructor. You can only choose one of these two places.
Static finalYou do not need to declare the class object to use, but can not be changed. The whole constant. (Class constant)
And static final and final static seems to have no difference, do not know, who knows tell me, MSN: caoxicao@hotmail.com