In my trying AsyncTask I get email address from my server. In onPostExecute() I have to check is email address empty or null
AsyncTask
onPostExecute()
empty
null
My simple solution to test if a string is null:
if (s.equals("null")){ ..... }
There are two cases.
The variable (of type String) is null(doesn't exists): == works.
The variable has a null value, *.equals("null") gives te right boolean value.
See the picture.