Answer to Question #182422 in Java | JSP | JSF for Tim

Question #182422

*Based on answer choices A-E, what is the code's output?


2. Given the following code, the output is __.


String str1 = new String("Apple");

String str2 = "Apple";

System.out.print(str1.equals(str2));


A. 0

B. 1

C. false

D. true

E. str2


1
Expert's answer
2021-04-18T17:29:04-0400

D. true


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog