*Given answer choices A-E, what is the code's output?
1. Given the following code, the output is __.
String str1 = new String("Apple");
String str2 = "Apple";
System.out.print(str1 == str2);
Answer Choices:
A. 0
B. 1
C. false
D. true
E. str1 == str2
The true answer is "C".
Comments
Leave a comment