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.
1) UseCodeTags 2) Don't use == for String comparison - that checks if the two String references are referencing the exact same object. Since substring creates a new String object that's not the case here. Use the .equals method instead:
First of all, I'm really sorry for posting the same thing 3 times. But it wasn't intentional. The first 2 times when I clicked on the submit button, I got a message that JavaRanch is maintaining its servers, so please try in a while. I never checked to see if the message was posted.
Secondly, I'm new here and will slowly learn the rules of the forum. I'll use Code Tags from the next time.
Finally, thank you for answering. That helped.