FYI, the arsenal of methods for doing this allows you also to do MyString.equalsIgnoreCase(anotherString) which is similar to equals, except it ignores case, obviously
Also, (MyString.compareTo(anotherString) == 0) or
(MyString.compareToIgnoreCase(anotherString) == 0).
For non-ascii Strings,
you should not use any of the above and instead use a Collator, which is found in the java.text package.