Why String.equls() returns true but Stringbuilder.equals() returns false?
StringBuffer sb1 = new StringBuffer("Amit");
StringBuffer sb2= new StringBuffer("Amit");
String ss1 = "Amit";
String ss2 = "Amit";
System.out.println(sb1.equals(sb2)); //returns false
System.out.println(ss1.equals(ss2)); //returns true
Thx