i have a very basic doubt. what does null mean? when i initialize an object to null then what does it mean?
like if i write
String name=null;
and then when i print it to console
System.out.println(name);
it prints "null"
but how?
when i try to print the string length, it says null pointer exception. Does this mean that name has no length yet.
if yes then, if a String initialized to null has no length then why does "null" get printed.