Is null an Object
in Java?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
No ,
null
is not an object.It is a reference type and its value does not refer to any object and so there is no representation ofnull
in memory.No, it's not an instance of a Class nor a Class. It's a reference to nothing.
Edit: haven't read the spec so the above may not be 100% accurate.
Absolutely not:
null instanceof Object
returns false.