You can create a Rectangle object with Rectangle rec = new Rectangle(10,10), and then later do something like rec.origin.x and get a value returned. If when you use the new Point(0,0), you no longer are able to access that reference, how does the origin object in rec know where to go? I have used these types of statements several times, but coming across Sun's statement that you lose the ability to access this reference after the statement is done executing through me for a loop (and not the good kind that ends cleanly). Is it due to the fact that when you send the unassigned reference to Point p you are now giving it a variable it is associated with? If you want to see the whole code, it's at: http://java.sun.com/docs/books/tutorial/java/data/objects.html Select the CreateObjectDemo, Point and Object java files. I figure enough of you have been through this tutorial that you know precisely where and what I am talking about Jason [This message has been edited by jason adam (edited July 12, 2001).]
[This message has been edited by Marilyn deQueiroz (edited July 12, 2001).]
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
10
posted
0
This seems to have nothing to do with the Cattle Drive assignments. I'm moving it to Jave in General (beginning)
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt