![]() |
Objects...
Not sure if this question is Java-specific or not, but in the following example code...
:
class Ball {Does anotherVariable just point to newball? Does it duplicate it? |
Try this, and you tell me: :)
:
public class Test { |
It only points to the original.
|
Just for future reference you should NOT use newwhatever for an object name because it might get confused the reserved word in java 'new'. :D
|
Quote:
|
Quote:
|
Ohhhh, okay. I've been thinking about code too much recently :)
|
| All times are GMT -5. The time now is 8:47 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC