We cannot create an empty char like this char ch = '';
, and this is understood because there is no empty character in ASCII. There are NULL characters and white characters but those are not empty characters so char ch = '\0';
is possible but not char ch = '';
.
Now, we can create a empty string in Java, and string is nothing but an array of characters, so it makes me wonder how an empty string would be stored?
EDIT:
I agree with everybody that in Java String is not array of characters but in the end to store a string there would be character coming into picture otherwise I will wonder how strings are stored, I mean in the end each character in the string will be stored as a BYTE, now how a empty string will be stored?