Item 22. Constant Interface
public interface PhysicalConstants {
static final double AVOGADROS_NUMBER = 6.022_140_857e23;
static final double BOLTZMANN_CONSTANT = 1.380_648_52e-23;
static final double ELECTRON_MASS = 9.109_383_56e-31;
}μμ μΈν°νμ΄μ€μ λμ
public class PhysicalConstants {
private PhysicalConstants() {} // μΈμ€ν΄μ€ν λ°©μ§
public static final double AVOGADROS_NUMBER = 6.022_140_857e23;
public static final double BOLTZMANN_CONSTANT = 1.380_648_52e-23;
public static final double ELECTRON_MASS = 9.109_383_56e-31;
}Last updated