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メソッドの定義 | |
| // 2つの文字列を定義. | |
| String str1 = "ABC"; | |
| String str2 = "BCD"; |
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メソッドの定義 | |
| // 指定の書式で文字列を生成. | |
| String str = String.format("ABC:%s:DEF:%d", "XYZ", 123); | |
| // 出力. |
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に変換. |
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メソッドの定義 | |
| // 文字列の定義. | |
| String str1 = ""; | |
| // 文字列が空か判定. |
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メソッドの定義 | |
| // 文字列の定義. | |
| String str1 = "aBcDe"; | |
| String str2 = "AbCdE"; |
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メソッドの定義 | |
| // 文字列の定義. | |
| String str1 = "ABCDE"; | |
| String str2 = "ABCDE"; |
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メソッドの定義 | |
| // 文字列str1の定義. | |
| String str1 = "AbcDE!fgHI"; | |
| // 全て小文字に変換. |
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メソッドの定義 | |
| // 文字列str1の定義. | |
| String str1 = "AbcDE!fgHI"; | |
| // 全て大文字に変換. |
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メソッドの定義 | |
| // 文字列str1の定義. | |
| String str1 = " \t ABC \n "; | |
| // 前後の空白類を除去. |
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メソッドの定義 | |
| // 文字列strの定義. | |
| String str = "ABC, DEF, GHI, JKL"; | |
| // 正規表現にマッチした文字列で分解. |
NewerOlder