I need help on to override the equals method. I have everything working except for the equals method. The equals method that I current
If you are overriding equals method, then your above code is not correctly overriding equals method.
use below code instead for overriding equals--
public boolean equals(Object currency) {
Currency newref = null;
if (currency instanceof Currency) {
newref = (Currency)currency;
}
return (this.dollars == newref.dollars) && (this.cents == newref.cents);
}