|
(Review:) What does
A good answer might be:
The new operator creates an object using the constructor |
Two Steps with an Assignment OperatorTwo steps take place when an assignment operator is executed:
An object reference is information on how to find a particular object. The object is a chunk of main memory; a reference to the object is a way to get to that chunk of memeory. The variable str does not actually contain the object, but contains information about where the object is. Objects are created while a program is running. Each object has a unique object reference, which is used to find it. When an object reference is assigned to a variable, then that variable says how to find that object. In diagrams, an object reference is usually shown as an arrow from the object reference variable to the object. |
QUESTION 5:What does a variable of a primitive type contain? Click Here after you have answered the question |