Discussion Forum : Strings
Question - 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));
}
}
Options:
A .  true,true
B .  false,true
C .  true,false
D .  false,false
E .  None of these
Answer: Option D

Submit Your Solution Below and Earn Points !
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *