The Artima Developer Community
Sponsored Link

Design Forum
JVM's - anewarray instruction implementation

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
sheetal

Posts: 3
Nickname: sheetal
Registered: Jul, 2004

JVM's - anewarray instruction implementation Posted: Jul 8, 2004 3:01 AM
Reply to this message Reply
Advertisement
Thanks a lot for the reply. But still the idea of implementing the anewarray instruction of jvm is not very clear. I went to the site suggested by Marlene Miller(thanks once again). I am reproducing some part of the description over there:-

1> The anewarray instruction creates an array of object references. This instruction allocates space for the array of object references and initializes the references to null.

2> pops length, allocates a new array of objects of class indicated by indexbyte1 and indexbyte2, pushes objectref of new array.

From the 1st point I understood that an array of object references has to be created, but if the references are initialised to null where and when the references will point to objects?

From the 2nd point I understood that an array of objects has to be created.
Can anyone plz tell as to what exactly are we supposed to do b'coz the 2 statements mentioned above are quite contradicting ?

Topic: Arrays in JVM Previous Topic   Next Topic Topic: Software Documentation

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use