Java静态导入包

比如,随机函数,Math.random()

想要简化写法,那么,可以在导入包的时候,添加static

//下面一行会报错
//import java.lang.Math.random;
//如下调用就可以省略Math,直接调用random()
import static java.lang.Math.random;
原文地址:https://www.cnblogs.com/SuperZDK/p/13976068.html