cozliz, in the previously linked answer, it seems that you saw the equals, but not the format to use the method.

for example:

if(p1.equals(p2))
{
...