Source code for array implementation in java

Discussion in 'Java' started by ankur, Feb 1, 2009.

  1. ankur

    ankur Guest

    Hi All,

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

    Thanks,
    Ankur
    ankur, Feb 1, 2009
    #1
    1. Advertising

  2. ankur

    Stefan Ram Guest

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


    »jdk-7-ea-src-b45-jrl-29_jan_2009.jar« on

    http://download.java.net/jdk7/
    Stefan Ram, Feb 1, 2009
    #2
    1. Advertising

  3. ankur

    Arne Vajhøj Guest

    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.

    Arne
    Arne Vajhøj, Feb 2, 2009
    #3
  4. ankur

    ankur Guest

    On Feb 1, 5:39 pm, Arne Vajhøj <> 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.
    >
    > 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
    ankur, Feb 2, 2009
    #4
  5. ankur

    Arne Vajhøj Guest

    ankur wrote:
    > On Feb 1, 5:39 pm, Arne Vajhøj <> 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.

    Arne
    Arne Vajhøj, Feb 2, 2009
    #5
  6. ankur

    Arne Vajhøj Guest

    Arne Vajhøj wrote:
    > ankur wrote:
    >> On Feb 1, 5:39 pm, Arne Vajhøj <> 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/third_edition/html/arrays.html

    JVM spec is:

    http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#16446
    http://java.sun.com/docs/books/jvms/second_edition/html/Compiling.doc.html#4091

    Arne
    Arne Vajhøj, Feb 2, 2009
    #6
  7. ankur

    ankur Guest

    On Feb 1, 6:36 pm, Arne Vajhøj <> wrote:
    > Arne Vajhøj wrote:
    > > ankur wrote:
    > >> On Feb 1, 5:39 pm, Arne Vajhøj <> 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/third_edition/html/arrays.html
    >
    > JVM spec is:
    >
    > http://java.sun.com/docs/books/jvms.../books/jvms/second_edition/html/Compiling.doc...
    >
    > Arne


    ok, thanks Arne !
    Ankur
    ankur, Feb 2, 2009
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    450
    Huihong
    Sep 12, 2005
  2. Michael Tsang
    Replies:
    32
    Views:
    1,065
    Richard Bos
    Mar 1, 2010
  3. Robert Rozman
    Replies:
    0
    Views:
    150
    Robert Rozman
    Aug 22, 2004
  4. iMath
    Replies:
    3
    Views:
    201
    iMath
    Oct 18, 2012
  5. iMath
    Replies:
    11
    Views:
    194
Loading...

Share This Page