On Feb 1, 6:36*pm, Arne Vajhøj <a...@vajhoej.dk> wrote:
> Arne Vajhøj wrote:
> > ankur wrote:
> >> On Feb 1, 5:39 pm, Arne Vajhøj <a...@vajhoej.dk> wrote:
> >>> ankur wrote:
> >>>> I was wondering where is the source code for array implementation in
> >>>> java ? Any pointers would be welcome !
> >>> The source for java.util.Arrays comes with the SUN JDK.
>
> >>> Real arrays are a part of the Java language and is supported
> >>> by the JVM. Since SUN open sourced its Java implementation, then
> >>> you can also get the entire JVM source. But finding the parts
> >>> that specifically covers arrays may be a non-trivial task. And
> >>> probably not very relevant for the problem you are trying to solve.
>
> >> I was actually interested in understanding how arrays of primitive
> >> types are created and maintained.
>
> >> Array.class is in the util package and does not cover array
> >> constructors. Is there a class in Java.lang that covers how arrays are
> >> constructed and maintained. There is no specific issue I ma m trying
> >> to resolve ...just curiosity.
>
> > You can study the Java language and the generated byte code.
>
> > But if you really want to know the behind the scenes then I am
> > afraid you will need to look at the C code in the JVM.
>
> JLS is:
>
> http://java.sun.com/docs/books/jls/t...ml/arrays.html
>
> JVM spec is:
>
> http://java.sun.com/docs/books/jvms/.../Compiling.doc...
>
> Arne
ok, thanks Arne !
Ankur