Skip to content

Instantly share code, notes, and snippets.

@bg1bgst333
Created May 12, 2026 02:07
Show Gist options
  • Select an option

  • Save bg1bgst333/eaeea45f846b2e114ded2631b01353cd to your computer and use it in GitHub Desktop.

Select an option

Save bg1bgst333/eaeea45f846b2e114ded2631b01353cd to your computer and use it in GitHub Desktop.
String.equals
// メインクラス
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