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

回到话题: What's the difference between "int a[] = new int[5]" and "int[] a = new int[5]"?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论