Created
May 12, 2026 02:07
-
-
Save bg1bgst333/eaeea45f846b2e114ded2631b01353cd to your computer and use it in GitHub Desktop.
String.equals
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"; | |
| // 文字列が等しいか判定. | |
| boolean b = str1.equals(str2); | |
| // 出力. | |
| System.out.println(b); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment