java - how to check if a string is null
802079Sep 30 2010 — edited Sep 30 2010//initialize someString
String someString = new String("");
//some code here with that may reset the string someString
//now I need to check if someString is empty
//do I use:
if (someString == null)
//or
Object nullValue = null;
if ((someString.equals(nullValue))
//or
if (someString == "")
//if I need to check if the someString is not empty
//can I use
if(someString != null)
please advise !!!
thx.