Sometimes, or well, pretty often i need to see if a String is null or isn't, so i use a conditional like this:
if(str != null) {
}
It worked fine until this day, now even strings that are null pass for some reason which I don't get. Does anyone that knows an explanation? or a solution?
Edit: OK, so for some reason the string doesn't seem to be null, which is very odd since i never defined what it was, only denfined that it existed. So instead the string was a string of the word "null". Which i have totally no idea why it would be? When i do following:
String str;
then it's automatically null, right? And either way if it's not why would it become the string "null"?