public enum Enum{ // 自身のインスタンスを定数フェールドに設定 DATA1("DATA1_m1"), DATA2("DATA2_m1"), DATA3("DATA3_m1"); // インスタンス変数を設定。上で定義したオブジェクトそれぞれが所有する private final String s1; // このクラスのコンストラクタ。省略記法では、アクセス ...
Although it is part of the java.util.concurrent package, the TimeUnit enum is useful in many contexts outside of concurrency. In this post, I look at how the TimeUnit enum can be used even in code ...