if ( anything == " ") isn't going to be much use to you
try replacing those sort of if statements with if(isBlank(anything))
where isBlank is defined as below
private boolean isBlank(String str)
{
if(str==null) return true;
if(str.trim().equals("")) return true;
return false;
}
what you are doing in your code is comparing the handle of the respective
strings not the content
you could do something like if(" ".equals(anything)) if you only wanted to test
for
the single space character (but I don't think that is what you really want.