Card 6 / 37: public static void main(String[] args) { StringBuilder sb1 = new StringBuilder("Duke"); String str1= sb1.toString(); // insert code here System.out.println(str1 == str2); }
A)
String str2 = str1;
B)
String str2 = new string (str1);
C)
String str2 = sb1.toString();
D)
String str2 = “Duke”;
Answer:
A) String str2 = str1;
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|