I have a doubt regarding checking null condition.For eg :
value1= value; //value1 is string type
if(value1 == null)
If you want to check is a String is null, you use
if (s == null)
If you want to check if a string is the empty string, you use
if (s.length() == 0)
An empty string is an empty string. It's not null. And
== must never be used to compare string contents.
== tests if two variables refere to the same object instance. Not if they contain the same characters.