I was going through 'equal' method concept in effective java, and there I found below code:
@Override
public boolean equals(Object o) {
if (o instanceof CaseInsensitiveString)
return s.equalsIgnoreCase(((CaseInsensitiveString) o).s);
if (o instanceof String) // One-way interoperability!
return s.equalsIgnoreCase((String) o);
return false;
}
Here I am not able to get particular line that is ((CaseInsensitiveString) o).s
. Now what I understand from this piece of code is object 'o' is been typecast to CaseInsensitiveString
Class. Now what does ).s
mean.