Static import (static import)
In the past, we need to use a certain type of static variable in other packages, usually in front, the corresponding class name:
Double R = Math.cos (Math.pi * Theta);
Using static introduction, we can remove the previous class name, static introduction statements are like this:
Import static java.lang.math.pi;
It must be noted that this is not the class MATH here, but directly to the defined variable Pi.
Static introduction is not only a static variable, or a static method. Also available *, as shown below:
Import static java.lang.math. *;
Unless we have a large number of frequently constants (or methods), it should be avoided to avoid using static introduction.