Java: Why aren't NullPointerExceptions called NullReferenceExceptions?

后端 未结 5 2214
孤城傲影
孤城傲影 2020-11-30 07:45

Was this an oversight? Or is it to do with the JVM?

5条回答
  •  执笔经年
    2020-11-30 08:04

    This is due to the fact that Java was designed with C programmers in mind. In C terminoligy the word 'pointer' is used instead of 'reference'

提交回复
热议问题