class strb
{
static public void main(String...string)
{
StringBuilder s1 = new StringBuilder(\"Test\");
StringBuilder s2 = new StringBuild
StringBuilder class doesn't have the implementation of equals() method like one in the String class.
So it executes default Object class functionality, which again checks only for address equivalency, which is not same in this case. so it prints false.
Note 1: You can use == operator on objects also, but it simply checks if the address of both the objects are same or not.
Note 2: == operator plays good role in comparing two String objects created in string constant pool, to find out if it is really creating a new object in string constant pool or not.