I am passing an accountid as input from an XML file as shown, which will be parsed later and will be used in our code:
123456
String s1=""; // empty string assigned to s1 , s1 has length 0, it holds a value of no length string String s2=null; // absolutely nothing, it holds no value, you are not assigning any value to s2
so null is not the same as empty.
hope that helps!!!