以下のコードで == を使用すると、"Equals!" が出力されます。なぜですか? これら 2 つの異なる文字列 a と b が等しい理由を誰か説明できますか?
public class test
{
public static void main()
{
String a = "boy";
String b = "boy";
if(a == b)
{
System.out.println("Equals!");
}
else
{
System.out.println("Does not equal!");
}
}
}