Link to home
Start Free TrialLog in
Avatar of Simon Leung
Simon Leung

asked on

JEE Code query

What does the following code mean ?What does "^" represent ?

@Override
    public int hashCode() {
        return (
                (this.getPartNumber()==null?0:this.getPartNumber().hashCode())
                ^
                ((int) this.getRevision())
                );
    }

Beside, what doesthe highlighted code below mean ?
@Override
    public boolean equals(Object otherOb) {
       
        if (this == otherOb) {
            return true;
        }
        if (!(otherOb instanceof PartKey)) {
            return false;
        }
        PartKey other = (PartKey) otherOb;
        return (
                (this.getPartNumber()==null?other.getPartNumber()==null:this.getPartNumber().equals(other.getPartNumber()))
                &&
                (getRevision() == other.getRevision())

                );
    }
ASKER CERTIFIED SOLUTION
Avatar of Alex [***Alex140181***]
Alex [***Alex140181***]
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial