What is the difference between null and the \"\" (empty string)?
I have written some simple code:
String a = \"\";
String b
String s=null;
String is not initialized for null. if any string operation tried it can throw null pointer exception
String t="null";
It is a string literal with value string "null" same like t = "xyz". It will not throw null pointer.
String u="";
It is as empty string , It will not throw null pointer.