Asked by Kaylan Summey on Jun 05, 2024

verifed

Verified

Suppose str1 and str2 are String variables. The expression (str1 == str2) determines whether str1 and str2 point to the same String object.

String Variables

Variables that are used to store text data, composed of a sequence of characters.

  • Understand reference comparison using == for objects in Java.
verifed

Verified Answer

RM
Reoagile MolehiJun 09, 2024
Final Answer :
True
Explanation :
The expression (str1 == str2) compares the memory addresses of the two String objects. If they point to the same memory address, then they are the same String object.