I know that null is not a data type.
But null can only be assigned to any type of Object and String .
Example:
Object o = null; // it tells that null is an object String b = null; // it tells that null is of string type
Here null can be assigned to either Object or String , but if I want to put any object in String, we must use the cast type. but for null there is no type. something like the following
String b =(String) o;
This is why I doubt that the data type is NULL. How null can be assigned to any object or any String. How is null implemented in Java?
user831722
source share