●文字列を整 数に変換
Integer.parseInt(str)
Integer.parseInt(str)
-----------------------------------------------
class Sample{
public static void main(String[] args) {
// TODO code application logic here
String str = "4";
int num = Integer.parseInt(str);
System.out.println(num);
}
}
-----------------------------------------------