I generated methods hashCode() and equals(Object obj) by netbeans insercode. In netbeans I can compile without errors, but when I compile it on my server with javac:
bangserver/Login.java:3: cannot find symbol
symbol : class Objects
location: package java.util
import java.util.Objects;
^
and other errors with Objects...
public int hashCode() {
int hash = 5;
hash = 47 * hash + Objects.hashCode(this.password);
return hash;
}
What you guys think should be problem he can't find java.util.Objects ?
It looks like you're compiling with a Java verson older than Java 7, since java.util.Objects
was only added in Java 7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With