What is meant by 'static' import in java
本问题已经有最佳答案,请猛点这里访问。
What does the following line of code says
1 | import **static** javafx.application.Application.launch; |
I'm not asking anything about the package or the method.
But explain me what 'static' keyword is doing there.
静态进口申报类似于普通进口申报。如果常规导入声明从包中导入类,允许在没有包限定的情况下使用它们,静态导入声明从类中导入静态成员,允许在没有类限定的情况下使用它们。