LoginSignup
1
1

More than 5 years have passed since last update.

数値(int)⇔文字列(String)変換

Posted at

数値 ⇒ 文字列

String s = String.valueOf(i);

文字列 ⇒ 数値

int i = Integer.parseInt(s);

よく使い、よく忘れるのでメモ。

1
1
0

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
1
1