Question: Suppose you have 2 String variables like this: String s1 = Hello; String s2 = GBye; and you then you test them for equality

Suppose you have 2 String variables like this: String s1 = "Hello";

Suppose you have 2 String variables like this: String s1 = "Hello"; String s2 = "GBye"; and you then you test them for equality like this: if (s1 == s2 ) System.out.println("they are identical strings"); Would you consider this test to be a DEEP test for equality or a SHALLOW test for equality? DEEP SHALLOW

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!