Question: 7. st ringBuilder sbl = new StringBuilder (Duke); 8. string st r 1 = sbl.tost ring(); 9. 1/ insert code here 10 system, out, print

 7. st ringBuilder sbl = new StringBuilder ("Duke"); 8. string st

7. st ringBuilder sbl = new StringBuilder ("Duke"); 8. string st r 1 = sbl.tost ring(); 9. 1/ insert code here 10 system, out, print (str1 == str2) ; Which code fragment, when inserted at line 9, enables the code to print true? A. String str2 str1; B. String str2new String (str1) C. String str2 sb1. toString 0 D. String str2 - "Duke

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 Databases Questions!