Outofmeoryerror due to infinite loop because of equals method implementation : I am just trying to understand equals method. I overrode this method in a custom class just to see the behavior but getting out of memory error due to an infinite loop.I know the contract  to override equals method
1) Reflexivity
2) Symmetry
3) Transitive
4) Consistent
5) For any null reference, it must return false


    public class Reflexivity 
    {
	   public static void main(String[] args) {
		Reflexivity reflexivity = new Reflexivity();
		Reflexivity reflexivity1 = new Reflexivity();
		System.out.println(reflexivity.equals(reflexivity1));
	    }
	@Override
	public boolean equals(Object obj) {
		 if (obj == this) {
	            return true;
	        }
		 if (!(obj instanceof Reflexivity)) {
	            return false;
	        }
		// TODO Auto-generated method stub
		return this.equals(obj);
	 }
    }