Results 1 to 1 of 1
- 10-04-2011, 03:38 AM #1Member
- Join Date
- Sep 2011
- Rep Power
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
Is this right?
- By Ciwan in forum New To JavaReplies: 7Last Post: 06-28-2011, 08:24 PM
- By aizen92 in forum New To JavaReplies: 11Last Post: 04-01-2011, 08:39 PM
- By katie in forum New To JavaReplies: 2Last Post: 10-19-2009, 03:45 PM
- By tornado in forum New To JavaReplies: 3Last Post: 12-05-2008, 12:51 AM
- By Deathmonger in forum New To JavaReplies: 2Last Post: 03-12-2008, 02:51 PM