we know that == operator compares the refrences of the object whereas Object.equals() method compares the content i.e their state.
The == operator does compares the references of the objects -- but so does the Object.equals() method. To get the equals method to compare the "state", you need to override the method.
Originally posted by Vyas: I thought equalsIgnoreCase() compares the case
The Object class does not have an equalsIgnoreCase() method. However, the String class does. The String class also overrides the equals() methods so that it compares the values of the strings -- instead of just references.
Henry
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.