ExamQuestions.com

Register
Login
Java SE 8 Programmer Exam Questions

Oracle

Java SE 8 Programmer

36 / 76

Question 36:

Given the code fragment: 
image
Which code fragment, when inserted at line 9, enables the code to print true? 

Answer options:

A. String str2 = str1;
B. String str2 = new String (str1);
C. String str2 = sb1. toString ();
D. String str2 = "Duke";