Results 1 to 1 of 1
- 10-04-2011, 03:38 AM #1
Member
- Join Date
- Sep 2011
- Posts
- 10
- Rep Power
- 0
Reference, instantiating an object覧 how does JVM actually operate?
If there is a class called ball
and you newed 2 ball object called ball1 and ball2, during runtime, does JVM give every newed ball object memories respectively (and set their parameters as the programer intended) or does JVM somehow point back to the very original ball class, modify its value to, say ball2, then use it AS ball2, and when finished using, change everything back to ball (the original class)?
Or a little of both?
Also, I hear that
ball ball0 = new ball
ball ball1 = new ball
is EQUIVALENT as:
ball ball[] = new ball[2]
?
Is this right?
Similar Threads
-
Assign a new Reference for an Object
By Ciwan in forum New To JavaReplies: 7Last Post: 06-28-2011, 08:24 PM -
object and reference
By aizen92 in forum New To JavaReplies: 11Last Post: 04-01-2011, 08:39 PM -
Object and reference
By katie in forum New To JavaReplies: 2Last Post: 10-19-2009, 03:45 PM -
Very new to Java, how to reference an object
By tornado in forum New To JavaReplies: 3Last Post: 12-05-2008, 12:51 AM -
Getting the Object Reference Name
By Deathmonger in forum New To JavaReplies: 2Last Post: 03-12-2008, 02:51 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks