This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
But calling toUpperCase() on a large String (several thousands characters) may have a negative impact on memory usage. This is one of those cases where you must make a trade off between better speed (toUpperCase(), contains()) and less memory (Pattern). If this operation is needed many times reusing a Pattern object may even be better.