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"; 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
Get step-by-step solutions from verified subject matter experts
