Since a NULL pointer terminates a list, we can also use the NULL pointer condition as a base case for many of our recursive functions on linked lists.
由于NULL指针会结束一个链表,所以我们也可以使用 NULL 指针条件作为基于链表的很多递归程序的基线条件。
That means a reference type can have a null pointer, but a value type cannot have a null value.
这意味着引用类型可能有空指针,但是数值类型不能有空值。
Unfortunately, many designers have still not learnt that the special null pointer or null object is an equally bad idea.
遗憾的是,许多设计者并没有认识到空指针或空对象带来的危害。
Detector: null pointer dereference and redundant comparisons to null.
检测器:null指针对null的解引用(dereference)和冗余比较。
It looks for cases where a code path will or could cause a null pointer exception, and it also looks for cases in which there is a redundant comparison to null.
它查找代码路径将会或者可能造成null指针异常的情况,它还查找对null的冗余比较的情况。
Unlike the dreaded null-pointer exception (which says nothing about what was expected to occur instead of the null pointer), a class-cast exception is relatively easy to debug.
与可怕的空指针异常(该异常除了报告空指针之外,对于将要发生的事情什么也不说)不同,类强制转换异常相对来说容易调试。
Unlike, for example, a class-cast exception, a null-pointer exception says nothing about what was expected instead of the null pointer.
例如,不像一个类转型异常,空指针异常不给出它所需要的内容的任何信息,只有一个空指针。
In many null-pointer exceptions, the true bug occurs where the variable is actually assigned to null.
在许多空指针异常中,真正的错误出现在变量被赋为空值的地方。
On some computers, it is possible to dereference the null pointer and the result is null, permitting execution to continue.
在某些计算机上,它可能取消引用空指针,结果是空的,允许继续执行。
Conversion of a null pointer to another pointer type yields a null pointer of that type.
一个空指针到另一个指针类型转换产生一个空的指针类型。
Conversion of a null pointer to another pointer type yields a null pointer of that type.
一个空指针到另一个指针类型转换产生一个空的指针类型。
应用推荐