Because the == operator checks that the two operands refer to the same object and not that the two objects represent the same value. toUpperCase() returns a new object every time, so the == will return false, even if the two different objects both represent the string "LOL".
Instead of using the == operator, use the equals() method.
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop