I have stumbled upon some existing code which is using static import for constants.
import static com.zee.SelfServiceConstants.ATTR_SEV;
import static com.zee.SelfServiceConstants.ATTR_SEV_CRITICAL;
and it is used in the same class as:
propertyMap.put(ATTR_SEV, ATTR_SEV_CRITICAL);
Is this a good practice?
Or the traditional way of referring to constants better?
propertyMap.put(SelfServiceConstants.ATTR_SEV, SelfServiceConstants.ATTR_SEV_CRITICAL);