Source code for array implementation in java

A

ankur

Hi All,

I was wondering where is the source code for array implementation in
java ? Any pointers would be welcome !

Thanks,
Ankur
 
A

Arne Vajhøj

ankur said:
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.

Arne
 
A

ankur

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.

Arne

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.

Thanks,
Ankur
 
A

Arne Vajhøj

ankur said:
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.

Arne
 
A

Arne Vajhøj

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top