K I did something like this and all ok now it return the true compare value
Code:public boolean equals(Object o) { System.out.println(o instanceof Moof); System.out.println(((Moof)o).getMoofValue()); System.out.println(this.moofValue); //XXX if ((o instanceof Moof) && (((Moof)o).getMoofValue() == this.moofValue)) { return true; } else { return false; }



Reply With Quote
Bookmarks