Vidyalelo
Java Programming · Q60

Strings

Programming · Java Programming · question 60

Q60

What will be the output of the following Java code? class output public static void main(String args[]) String s1 = "Hello i love java"; String s2 = new String(s1); System.out.println((s1 == s2) + " " + s1.equals(s2));

A.
true true
B.
false false
C.
true false
D.
false true
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board