A reference can not be NULL or it can be NULL?

后端 未结 7 938
忘了有多久
忘了有多久 2020-12-13 16:03

I have read from the Wikipedia that:

“References cannot be null, whereas pointers can; every reference refers to some object, although it may or may n

7条回答
  •  佛祖请我去吃肉
    2020-12-13 16:42

    You can have a null reference, not sure why anyone would say otherwise, it is a nasty side effect of some operations. You just can't create one directly.

提交回复
热议问题