▪️ソースコード
public class Sample2 {
public static void main(String[] args){
int i =0;
String str = "100";
i =Integer.valueOf(str);
System.out.println(i);
}
}
▪️int n = Integer.parseInt (①);
int n = Integer.valueOf(①);
①は数字として解釈させたい文字列("24"など)
▪️実行結果
100