本文共 206 字,大约阅读时间需要 1 分钟。
访问类的常量的时候,本来需要携带类型.访问,如果另一个类中使用较多就显得很不漂亮,可以import该常量或者全部*,这样就不需要携带类名了。
import static org.fkit.hrm.util.common.HrmConstants.USERTABLE;
import static org.fkit.hrm.util.common.HrmConstants.*;
就可以直接访问USERTABLE.
转载地址:http://opjqi.baihongyu.com/