Test ob1 = new Test(100,100);
Test ob2 = new Test(100,100);
System.out.println("ob1 == ob2: " + ob1.equals(ob2));
would make more sense as an example
here ob1 == ob2 is false where as ob1.equals(ob2) is true.
This is because == will compare the hashcodes (usually the memory location) of the 2 objects. They're distinct objects and therefore not in the same memory location.
.equals, on the other hand, compares the contents of the object, which, in this case, are equal.