Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の質問は簡単です。違いは何ですか -
s3=s1+s2そしてs3="string"?
s3=s1+s2
s3="string"
説明がとても下手だったと思います。
==との違いはわかり.equals()ます。
==
.equals()
s3Stringとを連結した新しいオブジェクトs1です。s2
s3
String
s1
s2
==それらのメモリアドレスを比較します。リテラル値ではありません。使用する.equals()