Question: String s 1 ; String s 2 = Frank ; s 1 = new String ( Frank ) ; if ( s 1 = =

String s1;
String s2=Frank;
s1= new String(Frank);
if (s1== s2))
System.out.println(Hello);
else
System.out.println(Goodbye);
After the above code executes, what will print?

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!