Results 1 to 1 of 1
- 10-04-2011, 04: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, 09:24 PM
- By aizen92 in forum New To JavaReplies: 11Last Post: 04-01-2011, 09:39 PM
- By katie in forum New To JavaReplies: 2Last Post: 10-19-2009, 04:45 PM
- By tornado in forum New To JavaReplies: 3Last Post: 12-05-2008, 01:51 AM
- By Deathmonger in forum New To JavaReplies: 2Last Post: 03-12-2008, 03:51 PM