0
String text = ""; // in java what will be the value of text?
6 Answers
+ 3
Yes... If you assign null to an object reference, then you indicate that the reference dont point to an object... In your case a String, though empty, its always an valid and existent object
+ 2
An empty string
+ 2
Mind To Machine đ€đ Its true based on my experience đ
+ 1
KrOW sounds true based on what i learned so far thx bro
0
yow KrOW is that different than a null assignment?
0
Why not just use the Playground and run it yourself?
But, to guess, as a non-Java programmer, text will equal a single byte whose value is 0 (NULL).
Rationale: It's initialised and in _modern_ C compilers, the zero-byte is appended during initialisation (if not explicitly there and if there is space/array size is unspecified, x[], etcetera).