As part of my learning curve, I added the following code segment to REST client. 在学习过程中,我在REST客户机中添加了以下代码段(CS)。
Nonetheless, there can be data, or simply garbage, in the code segment. 虽然如此,在代码段(CS)中可以有数据,或者只是无用信息。
The code segment on the left is from an EJB2.1 application. 左侧的代码片段取自某个EJB2.1应用程序。
The results will be identical, but the first code segment will run faster than others. 他们的运算结果是相同的,但是第一个代码片断要比其他片断运行的要快。
Now, even if the same code segment tries to access p before a value has been assigned to it and it has proper handling of the Null value ( which ideally it should be ), then it will behave properly. 现在,即使同一个代码段(CS)尝试在对p赋值前访问它,该代码段(CS)也能正确处理Null值(在理想情况下应具有的值),然后将具有正确的行为。