compare two object in java with comparble code example Example: how to compare objects in java this.equals(other)