LoginSignup
0
0

More than 5 years have passed since last update.

JAVA Integer.parseInt (); = Integer.valueOf();

Posted at

▪️ソースコード

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

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0