Understanding the difference between null and '\u000' in Java

后端 未结 4 1807
别那么骄傲
别那么骄傲 2020-12-02 13:36

I read in a book (Thinking in Java by Bruce Eckel, 4th edition, page 47) that null is equal to \'\\u000\'. And then I was wondering what e

4条回答
  •  庸人自扰
    2020-12-02 13:55

    null is a literal and you can see the specification which says in practice you can simply pretend that it's "merely a special literal that can be of any reference type".

    as @assylias said what you read was surely not out of java :)

提交回复
热议问题