I'm working with eclipse IDE (Version: 3.4.2) on a mac and I have met the following issue.

When comparing between strings using equal() or equalsIgnoreCase() methods I receive false even when the string are equal. For example, the code below consider the following condition as false, even when values[0] = "debug_mode"

Nothing to do with it. If writeUTF() worked and writeChar() didn't, he must have been reading with readUTF(), which certainly wouldn't work with data not written by writeUTF(). Unicode has nothing to do with this.
–
EJPNov 18 '10 at 8:16

I thought you were a stupid because of that stupid error, but... I thought to myselft: "It's always human errors, so, let me check my code". And what happend? It was your same error!! :P And I have almost an hour with this
–
Sterling DiazOct 18 '14 at 1:24

I'm with the others, this is crazy and shouldn't happen. I agree that printing it out may help, but I'm going to assume you've tried that.

Is it possible it's a localization issue? That is, when you type in debug_mode in the editor (for the string) it's the string "debug_mode", but when you type the string in during execution the terminal is set to use a different language and you're getting a different (but identical looking) character?

To find out, loop through the string you get in and print out each character's integer value, and then do the same with your string that's hardcoded and see if they are the same.

For reasons unknown to me it always hits the else block with message "Page can't be accessed due to status : active", though status is "active". I tried closing rs and stmt objects after each query before and after running this Query but that didn't helped. Eventually I changed my Query to

"select STATUS from TEMP_TABLE WHERE ID='"+id+"' where STATUS='ACTIVE'"