Java puzzle–StringBuffer

What will be the output of following program ?

  1: class StringBufferTest2 
  2: {
  3: 	public static void main(String[] args) 
  4: 	{
  5: 		StringBuffer sb1,sb2;
  6: 		sb1 = new StringBuffer();
  7: 		sb2 = new StringBuffer();
  8: 		sb1.append("Hello");
  9: 		sb1.append("Hello");
 10: 		boolean result = sb1.equals(sb2);
 11: 		System.out.println("Result = "+ result);
 12: 	}
 13: }

Comments

Popular posts from this blog

State Design Pattern by Example

Eclipse command framework core expression: Property tester

Composite Design Pattern by example