1. Class method declarations are static (static); they operate on the class itself, rather than on a single instance of the class.
2. The fields of a class can also be declared as static, which makes these fields a class field rather than an instance field. For each instance field, each object has its own copy, and the class field has only one copy, which is shared by all instances of the class.
Static methods or class methods (one meaning), static methods use public memory space, which means that all objects can be referenced directly, and no object needs to be created to use the method. Another method is an instance method.
3. A class inherits from another class, which is called a subclass of the latter. The classes in Java make up a class hierarchy. Java.lang.Object is the root of this hierarchy. Object is the final superclass of all other classes in Java.
4. Interface (interface) is a Java construct that defines methods, similar to classes, but does not provide any implementations of these methods. The class can implement this interface by defining an appropriate implementation for each method in the interface.
5.public static ComplexNumber Add (ComplexNumber a,complexnumber B)
{
return new Complex (A.X+B.X,A.Y+B.Y);
}/* static method, so there is no "current instance" or "this" object */
Public ComplexNumber Add (ComplexNumber a)
{
return new Complex (THIS.X+A.X,THIS.Y+A.Y);
}/* a non-static instance method with the same method name as the previous method, which can be used with the current instance
*/
Java Step1: Basic knowledge 2