I am new to java, and i was wondering what is the difference between equales and ==, i know you can over ride equales, and you can't overrdie ==, but how?
Lets say i have java class Dogs, and if dogs are from same kind i want them to be equale, how can i do it?
public class Dogs{
private String dogKind;
public Dogs(String kind){
this.dogKind = kind
}
public String getDogKind(){
return this.dogKind;
}
}
So where in how i override equales?