I was asked

Object methods

public native int hashCode();
public boolean equals(Object obj) {
  return (this == obj);
}
protected native Object clone() throws CloneNotSupportedException;
public String toString() {
  return getClass().getName() + "@" + Integer.toHexString(hashCode());
}
public final native void notify();
public final native void notifyAll();
public final native void wait(long timeout) throws InterruptedException;
protected void finalize() throws Throwable { }

ob1.Equals(ob2) --> ob1.hashcode == ob2.hashcode

Continue reading “I was asked”