【Java】文字列から数値へ変換(Integer.parseInt, intValue)
文字列から数値に変換する方法です。
①文字列から数値
String s = ”1”; int i = Integer.parseInt(s);
②文字列から数値
String s = ”1”; int i = s.intValue();
文字列から数値に変換する方法です。
String s = ”1”; int i = Integer.parseInt(s);
String s = ”1”; int i = s.intValue();