This content has been marked as final. Show 1 reply
kiacg wrote:If you are talking about objects, you are correct, but for characters "null" is a term used to describe the character '\0' that is, the first ascii character, with unicode value \u0000 or hex value 0x00. It's an old comms term that predates object oriented programming by a couple of decades.
So, I have no experience with using null, but the code I am working on requires char to be set to null, specifically values in a char array.
According to the book I'm using, "null is a special constant that can be used to give a value to any variable of any class type". However, when I try to set an item in the char array to null, the compiler returns
Error: incompatible types
found : <nulltype>
So, I'm wondering if this is possible at all. Or how to do it exactly.