I heard several times that in using boolean equals(Object o) to compare Strings, it\'s better to put the constant on the left side of the function
boolean equals(Object o)
Strings
This is a defensive technique to protect against NullPointerExceptions. If your constant is always on the left, no chance you will get a NPE on that equals call.
NullPointerException
equals