Vidyalelo
Java Programming · Q107

Strings

Programming · Java Programming · question 107

Q107

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

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

Answer: Option C

Solution

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