more detailed.

chineloon (chineloon)
In C/C++, i of i[] is a constant pointer. In JAVA, instead, i of i[] is a variable, which points to a Array Object. When you call change_i(i), the value of i (not i itself) is passed into the methed, within which a new parameter variable i is created and assigned by the passed value.
2000-11-28 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: What's the difference between "int a[] = new int[5]" and "int[] a = new int[5]"?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论