「java」Integerクラスのサンプル
書式
Integer.valueOf(数値)
使用例
package com.arkgame.serializ.demo;
public class Sample {
      private static final int num = 120;
      public static void main(String[] args) {
            Integer valA = num;
            System.out.println("値1:" + valA);
            Integer valB = Integer.valueOf(num);
            System.out.println("値2:" + valB);
      }
}
結果
値1:120
値2:120