Vidyalelo
Java Programming · Q47

Strings

Programming · Java Programming · question 47

Q47

What will be the output of the following program code? public class Test public static void main(String args[]) String s = "what"; StringBuffer sb = new StringBuffer("what"); System.out.print(sb.equals(s)+","+s.equals(sb));

A.
true,true
B.
false,true
C.
true,false
D.
false,false
Answer
E.
None of these

Answer: Option D

Solution

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