A good answer might be:Yes. |
Method Changing an Element
There is only one array, and the method has a reference to it. The method is able to change the elements of the array, as the picture shows. The difference between the first program and this example program is that arrays are objects. When a method is called with an object as a parameter, the method gets a reference to the object and can change the object (if the object allows changes.) Remember that some objects do not allow any changes, such as String objects. |
QUESTION 8:If main() had the following method call, what would happen to the array?
Click Here after you have answered the question
|