I don't know what is the problem with this code.
public Polynomial negate(){
int i;
for(i = 0; i<this.coefficients.length;i++){
this.coefficients[i] = -this.coefficients[i];
}
return this;
}
Polynomial is the name of the class and coefficients[] is an array of the coefficients. This method is supposed to return the array with all its values negated, but instead it returns some weird directions like [D@5afaa824