|
Does using str in the above statement change the information in it? A good answer might be:No. Using the information does not change it. This is the same as with primitive variables: using them (in an arithmetic expression, say) does not change their information. | |
Larger ExampleHere is a slightly larger version of the example program, now with a new variable of a primitive type:
When the statement
is executed, a new object is created and a reference to it is placed in str. The variable str now refers to the String object. | |
QUESTION 7:What happens when the statement
is executed?
Click Here after you have answered the question
|