Question: Consider the following code: String a = new String ( candy ) ; String b = new String ( candy )
Consider the following code:
String a new Stringcandy;
String b new Stringcandy;
if a a
System.out.printyes ;
else
System.out.printno ;
if a b
System.out.printyes ;
else
System.out.printno ;
if aequalsb
System.out.printyes;
else
System.out.printno;
What will be printed when this code segment is executed?
Group of answer choices
no yes yes
yes no yes
yes yes yes
yes no no
no no yes
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
