   [java] Quick and Easy Question
  I can't seem to get this to stick in my head but:if I create a graphics object ("myGraphics") and then create another Graphics Object ("myOtherGraphics")and set myOtherGraphics = myGraphics.getGraphics();then, when I make changes to myGraphics, do the same changes happen to myOtherGraphics? or the other way around? in other words, are they referencing the same object. and if not, even though they aren't referencing the same object, does making changes to one, change the other?sorry if this is bit elementary. :)   
Graphics myGraphics = new Graphics();Graphics myOtherGraphics = new Graphics();myGraphics --------------->  Instance #1myOtherGraphics ---------->  Instance #2myOtherGraphics = myGraphics;myGraphics --------+------>  Instance #1    |myOtherGraphics ---+    Instance #2// Instance #2 is garbage collected, since nothing is pointing at it anymoreQuote:in other words, are they referencing the same objectYes.Quote:myOtherGraphics = myGraphics.getGraphics();Why myGraphics.getGraphics()? Why not myOtherGraphics = myGraphics; ?getGraphics() could be returning anything, in which case what they point to depends on how getGraphics is implemented.;  Thats just how the code in the book I am reading is written.   