Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Source code for array implementation in java

Reply
Thread Tools

Source code for array implementation in java

 
 
ankur
Guest
Posts: n/a
 
      02-01-2009
Hi All,

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

Thanks,
Ankur
 
Reply With Quote
 
 
 
 
Stefan Ram
Guest
Posts: n/a
 
      02-01-2009
ankur <(E-Mail Removed)> 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/

 
Reply With Quote
 
 
 
 
Arne Vajh°j
Guest
Posts: n/a
 
      02-02-2009
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


 
Reply With Quote
 
ankur
Guest
Posts: n/a
 
      02-02-2009
On Feb 1, 5:39*pm, Arne Vajh°j <(E-Mail Removed)> 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


 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      02-02-2009
ankur wrote:
> On Feb 1, 5:39 pm, Arne Vajh°j <(E-Mail Removed)> 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
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      02-02-2009
Arne Vajh°j wrote:
> ankur wrote:
>> On Feb 1, 5:39 pm, Arne Vajh°j <(E-Mail Removed)> 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/...doc.html#16446
http://java.sun.com/docs/books/jvms/....doc.html#4091

Arne
 
Reply With Quote
 
ankur
Guest
Posts: n/a
 
      02-02-2009
On Feb 1, 6:36*pm, Arne Vajh°j <(E-Mail Removed)> wrote:
> Arne Vajh°j wrote:
> > ankur wrote:
> >> On Feb 1, 5:39 pm, Arne Vajh°j <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
where to view open() function's C implementation source code ´╝č iMath Python 11 12-19-2012 04:49 AM
where to view range([start], stop[, step])'s C implementation source code ´╝č iMath Python 3 10-17-2012 11:23 PM
Separate Template Definition I wrote class Data in header. The C++Compiler compiled without errors. I decided to move all member functionsinto source code because they are for implementation. I do not like thatthey are placed in class body. Immortal Nephi C++ 12 07-30-2010 11:54 AM
is there any "join" implementation source code available? wyhang@gmail.com C++ 6 09-12-2005 02:37 PM
Live floorplan implementation possibilities - any open source/free code? Robert Rozman Javascript 0 08-22-2004 10:54 PM



Advertisments