0
How to get the address of an index of array in java?
2 Answers
+ 7
Indu Devarashetty You can't get the memory address of any variable in Java because the language doesn't have any direct access to memory. My understanding is the JVM doesn't make that information available at the Java language level.
+ 4
I'm that not familiar with java, but I'm pretty sure you can't do anything with adresses. But in C, arrays reserve a block of adresses, and each index are one ahead the other, so *p[2] equals *(p + 2). That might help.