Programming Language String in Java Question #2226
Single Choice Not Set

QWhat 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));
      }
}

ID: #2226 String in Java 1,238 views
Question Info
#2226Q ID
Not SetDifficulty
String in JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A true,true
  • B false,true
  • C true,false
  • D false,false
Correct Answer

Explanation

false,false

Share This Question

Challenge a friend or share with your study group.