DID YOU KNOW THIS ? A Java array is quite different from a C++ - TopicsExpress



          

DID YOU KNOW THIS ? A Java array is quite different from a C++ array on the stack. It is, however essentially the same as a pointer to an array allocated on the heap. For example: int [] a = new int [100]; //Java is not same as int a[100]; // C++ but rather essentially same as int *a = new int [100] // C++ In Java, the [ ] operator is predefined to perform bounds checking. Also, to be noted is that, there is no pointer arithmetic - that means, you cant increment an array to point to the next element in the array.
Posted on: Thu, 04 Dec 2014 05:08:15 +0000

Trending Topics



Recently Viewed Topics




© 2015