About arrays memory locations where they are storing
I want to use pointer in java? i know that java not support pointers but i want to know that if i talk about arrays memory locations where they are storing ?
Can i know it? plz send your explination with a small program with comments?
thanks hopefully that i will recive it soon
Re: About arrays memory locations where they are storing
as of my knowledge arrays memory will be stored in the stack
Re: About arrays memory locations where they are storing
Array in java is reference type.
Reference type store memory in heap.
Re: About arrays memory locations where they are storing
ya I agree with Ramshri array is reference type and will be stored in heap ..
you can try it with native method by passing reference of array to that ... i hope it will work ..
Re: About arrays memory locations where they are storing
[QUOTE=BHASKAR CHAUHAN;15194]I want to use pointer in java? i know that java not support pointers but i want to know that if i talk about arrays memory locations where they are storing ?
Can i know it? plz send your explination with a small program with comments?
thanks hopefully that i will recive it soon[/QUOTE]
Hi Bhaskar, Array in Java considered as an Object even if it contains primitive and stored in Heap.
Re: About arrays memory locations where they are storing
Hi Bhaskar, Array in Java considered as an Object even if it contains primitive and stored in Heap.