A

Admin • 828.03K Points
Coach

Q. 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) true,false D. false,false
  • Correct Answer - Option(D)
  • Views: 13
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.