Created
May 12, 2026 04:49
-
-
Save bg1bgst333/ea712f411c106a7fe77680d0a8f58dfd to your computer and use it in GitHub Desktop.
String.valueOf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // メインクラス | |
| public class MainClass{ | |
| // Javaのエントリポイント | |
| public static void main(String[] arg){ // mainメソッドの定義 | |
| // int型変数iの初期化. | |
| int val = 1234; | |
| // int型をStringに変換. | |
| String str = String.valueOf(val); | |
| // 出力. | |
| System.out.println(str); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment